The technology is probably available, and it's entirely possible that ATMs could be recording serial numbers of dispensed cash and tying them to the account used, but it's (presently) deeply unrealistic that every possible (or even most) places that accept paper money have the ability or desire to record serial numbers of incoming & outgoing bills.
Serial numbers on bills are routinely scanned and tracked. There's a discussion here:
https://www.reddit.com/r/explainlikeimfive/comments/3ou4h4/e...
It's not done at the point of sale. It's done when the money is returned to the banks themselves, and when they're dispensed at ATMs. Cash doesn't circulate for long and anti-money laundering laws prevent payment for many expensive items in cash, so this can provide important clues about where the money goes.
For instance, withdraw money from an ATM, pay for food at your local grocery shop, and the bank/govt can see "withdrawal from account Herr Schmidt at 7:03pm Thursday, deposited by a grocery store down the road the next day" and conclude the money was used to buy food ... or at least had at most one hop in between.
Dump $50, get a random bunch of notes that add up to $50.
Dump a prepaid SIM, get a new prepaid SIM.