For anyone else landing here as I did. The problem seems to be with the snap installation of gh which aliases 'gh' to '/usr/bin/snap'. I removed the snap install and installed with apt (https://github.com/cli/cli/blob/trunk/docs/install_linux.md) and everything works ok.