What if TX_A gets orphaned due to forks? What happens to TX_B?
It will be considered invalid, and you’re Bitcoin will not be spent. It will only be considered valid on the other forks, assuming they don’t also invalidate the block. Usually the forks, if they are trying to play by the rules of the Bitcoin network, will also invalidate the block because the longest chain is always the valid chain.
Also, this should be referred to as an extinct block, see https://bitcoin.stackexchange.com/a/5869/60443