I had a similar issue on PhpStorm 2023.3.8
Turned out that I've marked the directory as excluded. When I removed the exclusion the option to run the file as PHP was visible again.