An active antenna (with long cable) on the windowsill is probably best, adding distance between the GPS antenna and RF noise of the MCU and other devices.
Does your GPS have an external antenna with a good view of the sky? Satellite lock may be intermittent and PPS erratic without external antenna.
Some discussion of GPS PPS and Teensy crystal drift and frequency...
I have a quad timer PWM test sketch qtmrtst.ino from the Teensy 4 beta testing days. Particular tests can be enabled to test interrupts for timer, underflow, and overflow, as well as test functions for Teensy 4 PWM and...