Defender conflict with RankMath’s WooCommerce base URL removal feature

I am using the RankMath plugin and using it to remove the base WooCommerce URL from the products page. The pages are giving 404 because the URLs are changed by RankPath but if I deactivated the Defender Pro plugin then the pages are working fine. Can you please check this?