Closing Window Crashes Plugin, related to some Lock in the JUCE code I'm calling

My plugin builds and runs fine (I actually haven’t looked at the code in about 7-8 months so I’m sure there’s plenty of bugs). When I click the “x” to close the window on Windows, I get a crash in my debugger. It takes me to juce_win32_Threads.cpp, where I get an access error - specifically line 46, which looks like:

void CriticalSection::enter() const noexcept { EnterCriticalSection ((CRITICAL_SECTION*) lock); }

I’m having a bit of trouble figuring out why this would pop up. I’ve read that the use of ScopedLocks could trigger this but I’m not actually using an Locks explicitly in my code. Of course I understand there are locks used within the windowing system etc. but I can’t quite figure out why closing a window would trigger an access violation related to whatever it is that the JUCE code is locking on. The only way I can reproduce this is by running my application and closing it. I can share the repo if it is useful for debugging. Maybe someone can point me to what resources a Lock is acquired for when closing the window?

Update: I’ve tried commenting out everything, leaving just a blank JUCE window and still get the same crash