When tailscale is on then cannot connect to machine via ipv4

I am having issues connecting to a new nixOS home server in my local network via ipv4. But this only happens when tailscale is running. If tailscale is up then if I try to do something like curl -4 -vvv from another machine then curl hangs indefinitely. If I run sudo systemctl stop tailscaled on the server then I am able to curl it via its ipv4 address. When tailscale is running if I do curl -vvv mymachine.local:9101 then I get a response since it seems to manage to connect via ipv6.

My tailscale configuration is very simple:

  services.tailscale = {
    enable = false;
    permitCertUid = "caddy";

My server is just connected via ethernet no wifi. Some configuration is done for wake on lan:

  networking.interfaces.enp2s0.wakeOnLan = {
    enable = true;
    policy = [ "magic" ];

  # Use a systemd service to persist the setting
  systemd.services.wol = {
    description = "Enable Wake-on-LAN";
    after = [ "network-online.target" ];
    wants = [ "network-online.target" ];
    serviceConfig = {
      Type = "oneshot";
      ExecStart = "${pkgs.ethtool}/bin/ethtool -s enp2s0 wol g";
      RemainAfterExit = true;
    wantedBy = [ "multi-user.target" ];

I have networking.networkmanager.enable = true;.

I also have:

     services.avahi = {
       enable = true;
       nssmdns4 = true;
       openFirewall = true;
       publish = {
         enable = true;
         userServices = true;
         addresses = true;

That is it when it comes to network options.