If you add the code to sitecustomize such as /usr/lib/python3.13/sitecustomize.py it will be loaded automatically in all sessions and virtual environments.
/usr/lib/python3.13/sitecustomize.py