Yes, there is. The documentation for this is right here: https://docs.mendix.com/developerportal/deploy/licensing-apps
Quote: "When you unlink your Free App from its Sandbox environment, the environment will be permanently deleted. This means that you will not be able to recover any data once the app is unlinked.
If you are unlinking from a licensed node, the node is NOT deleted and data is retained in the node.”
But you can of course create a backup and use it to restore! See step 4.4 of the guide.