EEEk ok so that query is fairly compliated and I don’t have the UD Fields it requires, but I would try to add
OPTION(OPTIMIZE FOR UNKNOWN)
In your version this can be done via an OrderBy Execution Setting as shown below but that may mess with your actual sort, so handle with care.
