
Hi GB, I'm Kimberly, an independent advisor, I'm glad to assist you today.
The issue appears machine-specific, a local repair could reset internal state:
Run Office Repair via Control Panel or Settings → Apps → Microsoft 365 → Modify → Quick Repair, followed by Online Repair if needed
After repairing, reboot and test Office Scripts again.
Should you have questions, please let me know.
Best regards,
Kimberly