You can allow-list certain IP address ranges to not need the local network permission and I believe that should stop the popup from appearing (but I'm not sure). See https://developer.apple.com/documentation/technotes/tn3179-u... for more information, TL;DR:

  sudo defaults write com.apple.network.local-network AllowedEthernetLocalNetworkAddresses -array "169.254.0.0/16"
  sudo defaults write com.apple.network.local-network AllowedWiFiLocalNetworkAddresses -array "169.254.0.0/16"

I did that yesterday after updating from macOS 14 to 15 on my work laptop; well, added "10.0.0.0/8" too. Spent a few hours trying to understand that that new permission thing simply couldn't work with my Emacs launch agent (service)... fucking Apple treating CLI users like dirt.

Thanks for writing and then sharing this document. (Kidding. Thanks though.)