Afaict from your description, this is a pure DWG export problem. Is the behaviour identical when you drive it manually through the end user interface? If it differs, i.e., works correctly through the UI and causes problems via the API, please state so and provide a complete minimal reproducible case for both contexts that we can pass on to the development team for analysis:
If the UI and API behaviour is identical, as I would expect, then it is not an API issue. In that case, please raise it in the larger and more generic architectural forum for the product support team to take a look. Maybe they have some suggestions on optimal workflows and best practices that we are not aware of here in the API-specific forum: