There are a lot of things that have to fall into place before this will work, e.g., the serial number has to be the same, the vendor's refund policy isn't store credit, the product you're returning is really defective (and not a problem with compatibility), etc.
There's a high risk you'll run into nightmares. Imagine the vendor found out that the serial numbers are different. They'll cut off communication with you because they think you're trying to cheat them.
For me, I rather wait a few more days for the RMA than to risk running into crap. It's a double-edge sword here.
You have to keep in mind that vendors have ways to detect whether a swap was done. Some buyers abuse the system by swapping an old product for a new one. So even though you're just trying to save time, the vendor might think you're trying to cheat.