Hello,
Thank you for contacting us and we regret the inconvenience caused.
I tested on my end and both the filters are working even when added together. Please ensure that you have not added duplicate filters (pasted twice).
If that’s not the case, we might need to take a closer look. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.
Please do take a complete backup of your website before sharing the information with us.

It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:
https://wordpress.org/plugins/temporary-login-without-password/
You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):
https://wordpress.org/plugins/wp-security-audit-log/
We really look forward to helping you.
Thanks for your answer, I had to simplify the data, but here is the final code that I am trying to make work.
Hello,
Both the filters should work fine together. If they are still not working on your site then please provide the login details so we can take a closer look.
Looking forward to helping you.
Thanks.
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
Hello,
I tried to log in to your site but the URL is returning a 403 error:

Please disable the firewall so we can log in and assist you further.
Looking forward to helping you.
Thanks.
Hello,
In the second filter, you were reassigning the variable $post which was causing the issue.
After making a small change to the variable name in the second filter both of them started working as expected.
Don’t hesitate to get in touch if you have any other questions.
A big thank you to you 🙂
Hello,
We are super happy that this issue is already resolved. If you have any other questions in the future, know that we are here to help you.
If you don’t mind us asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.
If you have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.
Thank you.