To your question in proper, a transaction is sent back to the senders wallet if the node reject it for some particular reason, but i keep wondering why some node may not do the same for overstayed transactions unconfirmed, they remain on the mempool and were not rejected for long.
Wrong and confusing explanation.
When the transaction is unconfirmed, no transaction has actually been made and there is nothing to be sent back to the wallet.
Nodes have different settings, some may allow transaction to stay in their mempool for long time and some may have bigger size limit.