I've worked inside several cassette recorders. Often because the drive belt was broke.
The end-of-tape shutoff is designed to activate when there's no tape movement. During normal play I can see a mechanism moving back and forth once a second among the wheels. If the tape stops, or the wheels stop, that mechanism detects it and shuts everything off.
I've never figured out how the shutoff mechanism works. It's not easy to see what's going on between all the moving parts.
As stated by luben (post #2), it may involve a pulse being sent every so often.
Either you'll have to keep that detection mechanism moving back and forth, or you'll have to get into the circuitry and hook up a custom pulse generator.
If you can get a hold of a vintage recorder, they have an auto-shutoff that is easily fooled. It was activated by tape tension near the playback head. The mechanism easily got out of adjustment. Then it might never shut off. The motor could run forever. Or the capstan could rub right through the tape. Or the tape could wrap itself up into spaghetti.