This is just a note for me to remember what I did to make modern fortran extension in my local machine work again.
Since some time, Go to definition under Fortran stopped working. Among my few local machines, only one machine works OK, but others do not. So I can expect there is a way to fix. Although I guess the problem is on the local machine side, I could confirm Fortls server properly booting and shutting down when opened and closed a Fortran code. Reinstalling the extension on local and remote machines, removing remote cache, killing vscode processes on the remote side, etc, no way worked out. Finally it was fixed suddenly. I opened a src directory in the project directory that contains .git directory, and the extension warned that I have to install fortls although fortls is already installed. Then, the installation of fortls failed as expected. I closed the VSCode and reopened the project directory, it started to work properly again.