Get Session ID in independent script

Hello there. After an Update to Typo3 9.5.40 a PHP-Skript of mine, that needs the ses_id of the currently signed in BE-user stopped working. I figgured out that this is due to the be_typo_user cookie value is hashed now. I already read in this forum, that there is now way of unhashing it.

Does any other method exist, to get the ID of the currently sigend in BE-user? I have access to the Typo3-Database and to the core and src files of Typo3.

My Script is not a Typo3 extension but an independent script (due to customer needs). Is it still possible under this circumstances?

Thank you for your help.