Don't reboot your Raspberry PI
Sorry, could not resist
But, it is very hard to give any suggestions, without more information.
Like what is the Teensy running? How interactions does it have with stuff running on the RPI?
What I don't remember is, if when you reboot the Teensy, if it completely powers off the USB ports and back on or not. Or if it depends on if USB2 port versus USB3 port.
That is, does the Teensy reset as well?
If so, then maybe timing issue, that is maybe the teensy is expecting data earlier than the RPI can give it or likewise the Teensy is sending it before the RPI can receive it.
When I was running a Teensy off of an RPI, I had the startup code on the Teensy wait for some form of signal from the host, and then acknowledge it somehow.
Could be waiting for USB Serial data to be sent. Could be I connected one or more IO pins between the two. Where the RPI would signal me on one pin, and I could answer, either
on same pin or different pin.
or ???
But without additional information hard to give any specific suggestions.