How is Altitude/QNH defined state when passing transition altitude?
In Canada at least, you are supposed to make the change between QNH (alt setting) and QNE (standard pressure) while in QNE airspace, whether climbing or descending; that is, right after passing the transition altitude while climbing, or just before passing transition altitude while descending.  The variable overlap zone you describe resulting from the change in barometric pressure is not critical since you are almost always just passing through on a climb or descent clearance to an altitude a couple thousand feet or more above or below. ATC sees your altitude in 100 ft increments as broadcast by your transponder, computed baro alt (transponder's pressure alt signal corrected for local baro pressure) when below the transition, then pressure alt when above, but they don't know or care what you are seeing on your altimeter while climbing through the transition as long as you level off where you are supposed to be.
So I would expect to see the altimeter setting change shortly after passing transition altitude when climbing, say within the next 500 to 1000 ft, but the pilot doesn't have to work out exactly what QNH altitude to observe to be able to make the switch right at transition alt.  Shortly following is good enough and if you are in a climb to, say, FL100, if you forget to set to 1013.25 until the TA is 8000 ft, it's not that big a deal (nobody's going to know - except for the Flight Data Recorder, and your pilot monitor nanny software that is... lol). All that matters is that you level off at your cleared FL. ATC only sees your FL, or FL corrected internally to baro, on radar so the controller isn't interested in where you switch exactly while in a climb as long as you level at the correct FL, although you are supposed to do it in a timely way.
On a descent, with a TA of FL50, I would expect to see the change from QNE to QNH while still above the TFL, say between FL50 and 60.  Even there, if you forgot to set to QNH until below FL50, if you are descending to a lower altitude, it's not critical as long as you level off at the cleared QNH altitude, monitoring software notwithstanding.
Note that Europe may have variations on this protocol, since in North America the transition level is FL180 everywhere except the high arctic (called the Standard Pressure Region in Canada), where the FLs start at the surface except where near airports.
This is the Canadian regulation on moving between Standard Pressure and Altimeter Setting zones:

Transition – CAR 602.37 – Altimeter Setting and Operating Procedures in Transition between Regions, specifies that except as otherwise authorized by ATC, aircraft progressing from one region to another shall make the change in the altimeter setting while within the standard pressure region prior to entering, or after leaving, the altimeter setting region. If the transition is to be made into the altimeter setting region while in level cruising flight, the pilot should obtain the current altimeter setting from the nearest station along the route of flight as far as practical before reaching the point at which the transition is to be made. When climbing from the altimeter setting region into the standard pressure region, pilots shall set their altimeters to standard pressure (29.92 inches of mercury or 1013.2 mbs) immediately after entering the standard pressure region. When descending into the altimeter setting region, pilots shall set their altimeters to the appropriate station altimeter setting immediately prior to descending into the altimeter setting region. Normally, the pilot will receive the appropriate altimeter setting as part of the ATC clearance prior to descent. If it is not incorporated in the clearance, it should be requested by the pilot.