Hi @Anonymous , I understand that you want to use a Firewall in another vnet where the two vnets are connected using site-to-site VPN.
See the note of UDR (user-defined route) : A next hop private IP address must have direct connectivity without having to route through Vnet Gateway or Virtual WAN. Setting the next hop to an IP address without direct connectivity results in an invalid user-defined routing configuration.
I'd recommend you replace site-to-site VPN connection between the two vnets with vnet peering. Vnet peering connects 2 vnets directly and there will be system routes created automatically. Then you can create UDR (8.8.8.8/32 -> 10.2.1.4) and attach it to Vnet1-VMSubnet.
Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.