Understandable behaviour, wanting to empty stack 1 before 2 (if you think of linear clog) but I'd say unintended behaviour.
Confirmed.
This bug needs a better title description.
I'm also strongly requesting this feature, however I may rephrase it.
Comparators operate as you would expect, giving a redstone signal equivalent to how full they are out of 15 (3/15ths full, 3 strong redstone signal)
Our feature request (if I follow everyone and myself right) is the ability to check IfEmpty on any container item, wether using a comparator or not. Personally, I'd prefer it rolled into comparators by changing the scale to be 1 power if items present +1 for each 1/14th full.
Detector rail also permanently powers the block below it once a cart has been detected at least once.
Confirming this issue in release versions 1.17.1 and 1.18.1, when attempting to load chunks from a 1.2.5 world that contain minecart entities.
1.17.1 log: