Commandline Standalone tests not working.

I have been trying to automate some standalone tests, to incorporate it within our flow.
However when I run the following command:
“C:\Program Files\Unity\Hub\Editor\2020.1.7f1\Editor\Unity.exe” -runTests -projectPath ./ -testPlatform StandaloneWindows64 -testResults x64_results.xml -batchmode
It eventually opens the test build, displays “All test(s) succeeded”, stays open and needs to be manually close. The test result are not getting saved as far as I can see and the Editor’s process also stays alive and needs to be ended through the task manager.

Am I doing something wrong or is there a bug somewhere?
There are no errors in either the editor or player logs.
I can successfully run it with the targetPlatform set to EditMode or PlayMode.

After one of the failed runs I tried to just open the project normally. Which immediately ran a standalone test I did not ask for, closed the test build automatically and closed the editor afterwards, placing a results.xml file in the root of the project. After that, running the above command does work properly.

Not sure what is going on, but it seems fixed now… Really weird.