I used the steam controller config. Used steam to run the game now I can play the game with my ps4 controller. I am going to share it if anyone is interested. You need steam and add the game directly from program files (add Gw2-64).
https://ibb.co/C1KczzT
My controller config is called Gamepad for Guild Wars 2 for ps4 controller.
https://ibb.co/ZYLpWh7