GitHub Copilot often stops working when you're using an outdated version of Copilot. I often had issues and just to update and restart copilot (and maybe the IDE) fixed the problem for me.