Hello,
I have two macs that are set up almost the same way. One is a mac mini m2. The other is an intel-based MacBook air. The script works great on the intel computer. However, on the m2 it doesn't work. They are running the same osx and the latest safari.