Thank you for reaching out.
For this scenario below
But from the same machine when I am trying to perform load testing on the application it gives 403 forbidden, blocked by app-gateway-v2.
Can you check the firewall log for you Application Gateway? and see what the client IP is when you get the 403 error. I wonder if JMeter is appending the client IP or if the WAF is blocking the request due to any other reason. Thanks