UIElements attempting to destroy object in Edit Mode

So I recently updated to 2021.3.3f1 and updated my packages.
Every time I now end running a scene I get the following error.
I have several UIDocuments with UIElements.
Is it something in my code that is doing this or is there a bug in UIElementsRuntimeUtilityNative?

Okay, I found out it is a known bug. Unity Issue Tracker - Error "Destroy may not be called from edit mode! Use DestroyImmediate instead." is shown when exiting Play Mode