Hi,
Azure Load Balancer can't use x-forwarded-for header. It is layer 4 balancer. Excerpt from documentation:
Load balancer operates on layer 4 and doesn't provide application layer gateway functionality. Protocol handshakes always occur directly between the client and the backend pool instance.
You can use Azure Application Gateway with VM scale set.
Please click Accept Answer and upvote if the above was helpful.
Thanks.
-TP