Hello James
Thanks a lot for your answer. I really like this filter and use it sometimes. But what solved my problem was another thing: I had a css class with the same name of the ACF relationship class used to show the loading posts. So there was a conflict and the loading freezed the screen. I just changed my css class name and everything works fine now.
Regards!