My best guess is that this is the result of something in your network configuration: e.g. DNS, or maybe DHCP. I'll assume you've not "tweaked" your macos network configuration.
When I've had issues similar to yours, I've been able to clear it up by installing
avahi on the reluctant Linux host. If your Linux host’s name is “jethro”, it will become jethro.local under the "zero configuration networking" scheme used by avahi and Apple's Bonjour.
You can easily check to see if
avahi is installed on your Linux host; one way is type
man avahi at the command line. If the
man page is there, then
avahi is almost certainly installed. If it's installed, you can check to be sure it's running:
$ ps -ax | grep avahi
... You should see something like this as the output:
346 ? Ss 0:20 avahi-daemon: running [raspberrypi3b.local]
383 ? S 0:00 avahi-daemon: chroot helper
raspberrypi3b.local is the Linux host from which I ran this command.
If it's not installed, there's almost certainly an
avahi package for your distro. Install it, and let us know if that resolves your issue.
avahi is installed & running, and you see a similar output to mine, then my guess/answer probably won't help you. You may want to try one of the other SE sites to get help troubleshooting.
Also, there's a good overview of zero config networking, and Bonjour in particular, in this Server Fault SE Q&A