System: MacOS 15.3.1
In my case it was a very stupid mistake, I guess if you don't pass the path the os doesn't try to read the file
Failed:
test.py
Worked
./test.py