Fix for 14005. GIL wasn't managed correctly in python spawned threads

In threads spawned within python the PyContext was never used. In those cases the releasing/acquiring of the Gil was simply skipped. Therefore scripts that looped over 'sleep' from a python created thread (a typical pattern in python services) would block all other python threads forever.

Closes #14005