The interpreter behaves in many areas very differently than the compiled code.
This was a design decision in 1992 (4D Compiler 1.0).
Interpreter behaves very “untyped” (variables can switch type during execution), the compiler is very strict.
To give a general answer:
as more “compatibility” settings you are using, as less new feature you should use.
If your code is not “nested transaction” ready, don’t use any of the transaction features introduced with v11 or later.
If your code is not Unicode aware, don’t use any of the new text features.
If your code is not object notation ready, don’t use any of the new commands using objects (introduced with 4D v16 R2 or later). Not any of them.
See: https://blog.4d.com/?s=compatibility for a discussion about compatibility settings.
See: https://blog.4d.com/?s=object+notation for features or remarks to object notation.