This is introduced in Origin 2022 and exist in Origin 2022b as well.
It will be fixed in Origin 2023 (not released yet).
There are GDI object leaks when
Open Notes window
Use color well (big leak)
Open Code Builder and close
Resize workbook which contains EMF graph cell
Open Task Manager and show GDI objects column in processes tab or Details tab to watch the increase. If it reaches 5000, and you open any project file (opju), you will get message about too many windows in current folder even if this isn’t true.
Workaround: Restart Origin.