Well, I think I finally figured this out. If you enable private Wi-Fi address then the Mac ignores the router's address reservation setting and picks a Wi-Fi address, seemingly at random.
My router is set to assign Sellotape“Sellotape” the IP address 192.168.0.76. With Privateprivate Wi-Fi address enabled, the Mac picked 192.168.0.70 which, of course, is different from the IP in the hosts file. With private Wi-Fi address disabled, it works:
Fifteen:~ mnewman$ ssh sellotape
Last login: Thu Oct 3 04:56:58 2024 from 192.168.0.78
Sellotape:~ mnewman$