The reason why I'm suggesting to have the same heap size for the benchmarks is that the maximum heap size is the single most important (tuning) setting for the JVM. Based on this setting the VM sizes its internal data structures and adepts its behavior.
Also, garbage collection times are typically* dependent on the size of the heap. With most* garbage collectors collecting a 32gb heap takes longer than collecting a 8gb heap. If the workload of the benchmark allows for the heap to be used entirely, then garbage collection overhead is directly related to the heap size.
* unless a "big heap" garbage collector like ZGC or Shenandoah is used