Hello, I'm new on this topic and got my first Shelly 1 today. Just did some wire connexions to try it without any switch. It worked fine till I got the same issue as you.
Wifi was running fine but the Shelly 1 kept disconnecting all the time.
I finally figured out that the Shelly 1 was automatically connecting to the 5ghz wifi, which is not suited for it.
So I just renamed the 5ghz wifi with another name to prevent the Shelly 1 to connect to it and now it works fine.
I also have a client access list behaviour on the router but this appeared not to be fit for purpose.
Hope this will help.
Regards.