Due to a problem in the Intel® Quartus® Prime software version 20.3 and earlier, you may see the preserve primitives like “preserve”, "preserve_syn_only” do not prevent the registers from being inferred as a RAM.
To work around this problem in the Intel® Quartus® Prime software version 20.3 and earlier, add this assignment to your .qsf
set_global_assignment -name INFER_RAMS_FROM_RAW_LOGIC OFF -entity<>
This problem is fixed starting with the Intel® Quartus® Prime Pro Edition software version 20.4.