Can't switch on Wi Fi after internet sharing stops due to VPN dropout
I've seen this issue before. I'm not sure why this happens, but have found that totally removing your Wi-Fi service, restarting your Mac, and adding your Wi-Fi service back again will resolve the issue.

While you don't specify your version of macOS, the steps below should work:


Go to Apple > System Preferences > Network
Select the Wi-Fi service on the left-hand side
Click on the cog icon at bottom-left and select Make Service Inactive
Now delete the service by clicking on the minus sign (i.e. the - button) at left of the cog
Click on the Apply button
Exit Network preferences
Restart your iMac 
Go to Apple > System Preferences > Network
Click on the plus sign (i.e. the + button) at left of the cog
In the pop-up window, ensure that Wi-Fi is selected from the drop-down menu
Click on the Create button
Make sure Wi-Fi is on


Let me know if this resolves the issue.