The issue is this: Working directory change with 2020.1 and later?
I just submitted a fix: https://github.com/psychopy/psychopy/pull/2819
Assuming the fix works, the next update should solve the problem. In the interim, as a temporary fix, you can add this code to the top of your script:
import os
os.chdir(os.path.dirname(os.path.realpath(__file__)))