There are two cases here.
You can request an RMA due to hardware failure. In this case, you get a replacement device and your licence is unaffected.
You can request an RMA for return (not replacement). This can occur in some cases with trials, with a cancelled order within a specific time frame, etc. This cancels the licence as well. You don't end up with a device.
You get another special category is when you have an older device and it gets RMA'd with a newer device, and the licence has to get changed from the old device to the new. e,g. MX64 ends up getting replaced with an MX67 under RMA.
If you requested an RMA for hardware replacement - then it sounds like the wrong type of RMA was keyed. You should not have gotten a replacement device though. It may be a case of checking the type of RMA requested with support.
Otherwise - the licence was correctly cancelled.