That's Fusion's behavior when writing out an occurrence. If you create a box as a new component, this creates a new occurrence, which is what you see in the browser. Run the "Move" command, making sure you choose "Components" as the type of object you want to move. Now, select the occurrence in the browser and arbitrarily move and rotate it. Next, export the occurrence as STL and then import it to see the result. You'll see that the imported STL is back at the original position before you moved the occurrence. This is because the STL export doesn't take into account the occurrence transform but is writing out the referenced component.
However, here's a workaround that creates a body with the desired transform and exports it.
# Get the body from an occurrence.
body: adsk.fusion.BRepBody = design.rootComponent.occurrences[0].bRepBodies[0]
# Create a temporary B-Rep copy of the body. This bakes the occurrence transform
# into the body.
tempBRep = adsk.fusion.TemporaryBRepManager.get()
tempBody = tempBRep.copy(body)
# Create a new document and make sure it isn't parametric.
doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType, True)
des: adsk.fusion.Design = doc.products.itemByProductType('DesignProductType')
des.designType = adsk.fusion.DesignTypes.DirectDesignType
# Create a real body using the temporary body.
root = des.rootComponent
newBody = root.bRepBodies.add(tempBody)
# Export the body as STL.
filename = 'C:/Temp/TransBodyTest.stl'
stlOptions = exportMgr.createSTLExportOptions(newBody, filename)
rslt = exportMgr.execute(stlOptions)
# Close the document without saving.
doc.close(False)
---------------------------------------------------------------
Brian EkinsInventor and Fusion 360 API Expert
Website/Blog:
https://EkinsSolutions.com