How to Compare ACF Fields Between Parent and Child Posts in Nested Query Loops

I have a section with a query loop from a custom post type (A), and inside it there is a repeated div that has a condition to display only posts with a certain word in the title. Then, within that div, there is another div with a new query loop from a different custom post type (B), whose repeated element is a div that also has a condition to display or not. This condition tries to compare, using dynamic data, whether one of the custom fields of the post from post type B is equal to another custom field of the parent post (the post to which it is a child element).

image

The problem I have is that this second condition is not working, even though I know that the custom field values are equal. When I test on the front end, I don’t see the post that should appear.