Zend certified PHP/Magento developer

Problem with redirects using similar ulr on routes.yaml

on my routes.yaml file a I have something like this:

enter image description here

The problem is that when I go to the page:
www.mysite.com/white-product/0004/product-test

It redirects me to “www.mysite.com/product/color-white.html” instead of “www.mysite.com/product-test.html”

but when I go to:
www.mysite.com/white-product/0009/product-similar-test

It works correctly.. and redirects me to “www.mysite.com/product-similar-test.html”

Why is this happening? I know I have a rule that redirects everything that was “/white-product/” to “www.mysite.com/product/color-white.html” Magento doesn’t give priority to more specific urls? I have more products and some redirect correctly and others use the general rule /product/color-white.html.

Can anybody help please?