the debug build uses the maui interpreter, while release build uses compile to native AOT and trimming. native AOT is more restricted than the interpreter and trimming can cause required code to be removed. You can disable these features at a performance cost (memory size and speed).
it is important to have internal diagnostics and logging to help "debug" release code.
note: in a normal .net app the difference between debug and release is compiler optimizations performed, rather than a completely different compiler.