I was struggling with this same exact issue. The way to solve it code free is this free plugin https://wordpress.org/plugins/advanced-post-queries/
This thing does exactly what you’re trying to do with relationship fields. No pre_get_posts, no writing custom queries or pasting a bunch of stuff in your functions.php file. Im totally grateful for this thing. If it helps you out in the same way please consider donating to the dev to support it. https://paypal.me/KaplanWebDev
I’m not in any way involved with this plugin, Im just happy it did exactly what I needed and its totally free.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2022 Advanced Custom Fields.