Restrict entity reference options to those available on current domain

This site we took over did tihs on a custom form.

If you do your own entity reference view, you need to add in the entity reference view the domain option Available on current domain = true.

Seemed we had to switch some entity reference from default to entity reference view to have the current domain honored.

However we learned that entity query itself should have an alter run by domain access that respects current domain.