Can you elaborate what you are trying to achieve by manipulating the payload twice? Maybe there is another way to get to your goal.
I don't say it is nonsense, but I think it would help to know the use-case.
I need to change the original request to some format that WAF can understand and apply its security check against then if the request is good, I need the WAF to pass the original request to the server as the server only understands the original request sent by the client
Maybe you can try a layered virtual. I am not a big fan of using layered virtuals since they add an extra layer of complexity when troubleshooting.
Traffic would flow like this:
vIP_1 >> iRule manipulates payload >> passes ASM >> vIP_2 >> iRule manipulates payload back >> backend server
Here are some steps for guidance.
In this approach you can also combine iRules and LTM Traffic Policies.