Your deck is exhibiting "tape skew". It's an unwanted force vector, generated at the capstan/pinch roller junction, which pushes the tape up or down within the tape path. If minor, it will cause the tape to buckle at the top or bottom of the adjacent guides. If major, the tape will completely exit the guide. This is a common defect in the 40S. There are many causes and many remedies.
Causes of skew:
-A misaligned PR (pinch roller) . Either azimuth or zenith error will do this. There are no adjustments for this in the 40S, however.
-A defective PR: get a new one from Teac
-Polished capstan shaft: replace or get sand-blasted
-Improper right tension-arm height/zenith.
-Low back-tension (if you drag your fingers on the supply reel, you may see the skew reduce): adjust motor resistor
-Too much take-up tension (drag your finger on the take-up reel to see if this reduces skew): adjust motor resistor
Most often, it's not just one of the above defects causing the skew, but several (and sometimes all of the above).
Excess skew is just one of many defects you will encounter with this deck. It's very old and has the potential of being a real bucket of worms.