visual_transform_apply doesn't affect object in Python script
Just setting the current frame is not enough:

scene.frame_current = scene.frame_end # does not work as expected


You need to set the frame as follows:

context = bpy.context # or whatever context you have
context.scene.frame_set(scene.frame_end)