Alternatively, you could setup a free shipping rate in your Shipping and Delivery settings. This would apply to all orders that meet the criteria you set. Then, customers can use a discount code, and still receive free shipping as the free shipping rate would not be setup through the Discounts section of your admin.
Let me know how this goes, and if you have any questions!
Hilary | Community Moderator @ Shopify - Was my reply helpful? Click Like to let me know! - Was your question answered? Mark it as an Accepted Solution - To learn more visit the Shopify Help Center or the Shopify Blog