Hello,
Thank you for getting in touch with us.
You can use this filter to change canonical URLs per your preference:
https://rankmath.com/kb/filters-hooks-api-developer/#change-canonical-url
Please note that we do not offer support for customizations that are not part of the plugin. If you are not familiar with coding, you can consult a coder to customize the filter for your situation. Do note that we neither support this type of edit and neither do we recommend doing this having provided the reason above already.
Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.