Referencing non-loaded collection in "IF" breaks data loading

it does make a lot of sense and it is expected behaviour. Nocode formulas are javascript functions, therefore their parameters must be evaluated when executing the function.
This is a common misunderstanding (look here, here and here)
A javascript if/else statement has the behaviour you are looking for and it is very easy to use. The nocode equivalent in weweb is a workflow with if/else split.