Imagine there are two collision blocks A and B. These are mined at the same time.
If both miners are neutral, the set of transactions in A is similar to the set of transactions in B.
One miner created new block C on top of block A and longest chain happened.
If the third miner is neutral too, it is likely that some transactions in B not in A are in C. And some in A’s parent block.
Do transactions of block B go back to mempool immediately after being created block C?
See https://bitcoin.stackexchange.com/a/109920/126793, attention at what is commented there:
New transactions start as UNCONFIRMED. At BlockConnected, they will transition to CONFIRMED. In case of reorg, at BlockDisconnected, they roll back to UNCONFIRMED..