RPI is Arm64 and Arm64 (and regular Arm) is known to have issues (due to bugs in the Haskell compiler’s runtime system on Arm/Arm64).
However, 4G is pretty tight on memory. This runs comfortably in 8G. It might run in 4G after the code is finalized and we get time to reduce memory consumption.