I understand that you're dealing with a frustrating issue where your WiFi drivers aren't working and the option to connect to WiFi has disappeared. This usually happens when the wireless adapter is off, missing, or the driver failed. The Code 45 error means Windows can't find the hardware.
I really recommend you to try to running the Surface Diagnostic toolkit first to see if there are missing, corrupted drivers and lacking updates. Below is the link on how to use it.
What's the model of your surface device? When did the problem started happening?
Let me know how it goes. Looking forward to your response.