The license isn’t freed up automatically. Once a mailbox is converted to a shared mailbox you can remove the license without the data being deleted.