Hi. I have a weird problem.
Working with Indesign 2021 & Woodwing
Did you get in touch with Woodwing support for this issue? I haven't done any woodwind-related scripting but maybe the operation is somehow asynchronous and tries to reach the object by id later on once the function call is done. Then closing the doc would make the object non-reachable. It's a shot in the dark here so Woodwing support is probably the best way to get answers.