HA Proxy does not support UDP load-balancing and only supports UDP traffic for Syslog this is noted in the upstream HA Proxy documentation and issues:
https://cbonte.github.io/haproxy-dconv/2.0/intro.html#3.1
https://github.com/haproxy/haproxy/issues/62
If you require UDP load balancing traffic, then you can deploy a vSphere with Tanzu topology that supports UDP load-balancing like Avi/NSX Advanced Load balancer or NSX-T deployments.
https://docs.vmware.com/en/VMware-vSphere/7.0/vmware-vsphere-with-tanzu/GUID-8908FAD7-9343-491B-9F6B-45FA8893C8CC.html