Your description of the problem does appear to be with your WiFi connectivity. Keep in mind WiFi reliability is vulnerable to a lot of things, the WiFi signal your router emits is a very, very low power signal so when you use your phone to connect to it there can be a lot of external influences that affect it. Wireless technology is still a convenience measure, it cannot fully replace the consistency of a wired-only network connection.
Anyway, confirm that your WiFi is or isn't an issue. Restart both your phone and your router, those are the two things directly tied to your WiFi connectivity with each other, and a restart of both also reduces the odds your problem is just a one-off glitch. If the same problem occurs after a restart at least you then know there is an actual problem to address.
Now go here and do a basic bandwidth speed test:
https://fast.com/
Let it do a cursory check and then tap on the 'Show more info' button. What are the resulting numbers for Download speed (showing in big letters), for Upload speed, and for Latency (loaded)? All three pertain to something like WiFi Calling because it's an interactive function where your phone is sending and receiving a data stream in real-time. There's a difference when you're doing other things online as there's usually some buffering involved when there are delays -- not as noticeable just using Instagram, a lot more noticeable in a phone conversation.
Also, WiFi reliability is affected a lot by distance. The further away you are from your router, the weaker the signal becomes and that conversely affects the bandwidth speed. If your WiFi Calling is more reliable when you're closer to your router, that's a clear sign it's a matter of just being within your router's effective coverage range.
Install this 'WiFi Analyzer (open source)' app:
https://play.google.com/store/apps/details?id=com.vrem.wifianalyzer&hl=en_US
Use it to do a check of your router's coverage range by walking through your home in different locations to see if you're getting good coverage everywhere or just in some areas.