[FIXED!]
A mutated version of this bug is still crawling around in v5.40:
When inserting time via "Insert empty space" action, and if there is a time signature marker (not simply a tempo change) right at the start of the time selection, the time signature will be lost.
"
Options: Add edge points when ripple editing or inserting time" only remembers the tempo change at the edge, but overwrites the time signature. (I suspect the algorithm forgets that, unlike other envelopes, tempo envelope points do not only carry bpm values but also time signature information.)
Before inserting time:
After inserting: