Custom exporter and problems with matrix and rotation order
With ther help of batFINGER and the other post, here's the working code:

import bpy
import mathutils
import math
from bpy_extras.io_utils import axis_conversion

item = bpy.data.objects["Camera"]

wm_src = item.matrix_world.copy()

m = axis_conversion(from_forward='-Y', 
        from_up='Z',
        to_forward='Z',
        to_up='Y').to_4x4()

wm = m @ wm_src

rot = wm.to_euler("XYZ")

rotx = math.degrees(rot.x)
roty = math.degrees(rot.y)
rotz = math.degrees(rot.z)

rot_fix = (rotx, roty, rotz)

print(rot_fix)