Go to Security & SD-WAN -> Appliance Status, then towards the bottom right corner of the status page you’ll see ‘Remove appliance from network...’. Click this and follow the prompts. This will remove the MX from the network, but keep it in the Organisation Inventory.
When it’s in the inventory but not assigned to a network another Organisation can claim it, or you can unclaim it. This will remove it from the Dashboard for the organisation.
None of these actions will remove the license for the device, but the license ‘clock’ continues to tick, so it won’t make your license last any longer.