Extension processing currently opened stage

Hi everyone,
Trying to implement an extension for omniverse I have stumbled upon a problem, which I can’t seem to figure out.
My extension writes, the active scene in omniverse’s viewport, to a usd file using the following method: omni.usd.get_context().save_as_stage(usd_path, None)
Then, it passes this usd_path to an external software, which processes it and returns an image to display in my extension.
When I execute the extension, it displays the current scene without problems, but when I modify the scene in omniverse and execute the extension again (without closing and opening the extension) it shows the previous image without the modification.
I have checked the usd_path and it is saving it with the modification correctly, but somehow with the extension active when I try to process it with the external software, it always displays the first instance. Anyone knows what may be happening?

Thanks in advance