C# Interop CloseDocument Fail

Using DraftSight 2025 SP4 Interop in C# to automatically generate PDF files, opening and closing a list of drawings frequently, the call to app.CloseDocument often throws an exception and crashes DraftSight.
 

In this new version, it no longer freezes the application itself; in previous versions, it was necessary to restart the application.
 

Is there any research about this issue?