Is it true that we could dual boot Mojave and Catalina, in the same APFS partition, and they don't have to have fixed sizes?
Below is an example of where the macOS versions named Mojave, Catalina and Big Sur (beta) have been installed in the same container. This is a triple boot arrangement. The output from diskutil list is shown below.
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *548.1 GB   disk0
   1:                        EFI ⁨EFI⁩                     209.7 MB   disk0s1
   2:                 Apple_APFS ⁨Container disk1⁩         547.9 GB   disk0s2

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +547.9 GB   disk1
                                 Physical Store disk0s2
   1:                APFS Volume ⁨MyMojave⁩                12.7 GB    disk1s1
   2:                APFS Volume ⁨Preboot⁩                 410.3 MB   disk1s2
   3:                APFS Volume ⁨Recovery⁩                1.7 GB     disk1s3
   4:                APFS Volume ⁨VM⁩                      1.1 MB     disk1s4
   5:                APFS Volume ⁨MyCatalina - Data⁩       4.5 GB     disk1s5
   6:                APFS Volume ⁨MyCatalina⁩              11.2 GB    disk1s6
   7:                APFS Volume ⁨MyBigSur - Data⁩         2.9 GB     disk1s7
   8:                APFS Volume ⁨MyBigSur⁩                14.9 GB    disk1s8
   9:              APFS Snapshot ⁨com.apple.os.update-...⁩ 14.9 GB    disk1s8s1

All the APFS volumes and snapshots exist in the same container partition and therefore share the space allotted to the container.
The OP's question indicates the assumption that each version of macOS would reside in a single volume. This is not true. In this example, Mojave uses 4 volumes, Catalina uses 5 volumes and Big Sur uses 6 volumes. The Preboot (disk1s2), Recovery (disk1s3) and VM (disk1s4) volumes are shared by all three macOS versions.
Below are the result of enter commands to get the volume uuid for the MyMojave, MyCatalina and MyBigSur - Data volumes. Each UUID is generated when a volume is created and therefore all such UUIDs are unique.
dma@dmas-Mac-mini ~ % diskutil info MyMojave | grep &quot;Volume UUID&quot;
   Volume UUID:               7C48B3D0-263E-4C25-9268-FD4001759334
dma@dmas-Mac-mini ~ % diskutil info MyCatalina | grep &quot;Volume UUID&quot;
   Volume UUID:               DCC8D3B0-3308-4FCC-B057-D4CE495A91FF
dma@dmas-Mac-mini ~ % diskutil info &quot;MyBigSur - Data&quot; | grep &quot;Volume UUID&quot;
   Volume UUID:               383CF355-F467-48CE-9124-B24149322EA7

Normally, macOS boots from the Preboot volume. Although all three macOS version share the same Preboot volume, they do not share the same preboot software. The preboot software for each macOS version is stored in a folder which has the same name as the UUID for a volume uniquely used by each macOS version. For this example, the boot software for MyBigSur is be stored in the folder named 383CF355-F467-48CE-9124-B24149322EA7 on the Preboot volume. Note that the name of the folder is the same as the volume UUID for the &quot;MyBigSur - Data&quot; volume given above.
Basically, the same setup is used to store the macOS Recovery software for each version of macOS, except the Recovery (disk1s3) volume is used.
The VM (disk1s4) volume is used by all three versions of macOS for virtual memory.
Mojave has an additional volume which is the root volume. For this example, this root volume is named MyMojave and has the identifier disk1s1.
When booted to Catalina⁩, the root volume is mounted read-only. For this example, this root volume is named MyCatalina⁩  and has the identifier disk1s6. Catalina has an additional volume which is both read and writeable. For this example, this volume is named MyCatalina - Data and has the identifier disk1s5.
When booted to Big Sur, the volume is named MyBigSur(disk1s8) is not even mounted. Instead, a snapshot volume (disk1s8s1) is mount as root. Big Sur has an additional volume which is both read and writeable. For this example, this volume is named MyBigSur - Data and has the identifier disk1s5.