The answer is given in the comment of @Dougie:
First boot expands the root FS to fill the whole SDCard. That's done with /etc/init.d/resize2fs_once which runs on first boot then gets deleted. That's there on RaspiOS Buster Lite.
and in the comment of @JaromandaX:
automatic resizing done automatically - the clue is in the word "automatic" - yes, ...
The risk damage due to power loss is greatly exaggerated.
Over 7 years using 9 Pi I have never experienced filesystem corruption due to power loss, although failed upgrades, user error and 2 worn out SD Cards have caused problems.
Attempting to have RO partitions is unlikely to help.
The mapping between partition and physical storage is under the control of ...
For an embedded project of mine, I use ro boot and rootfs, and two rw btrfs mirror raid partitions. I can cut power at anytime I need to, and my device can boot as the boot and root part are not modified. I chose btrfs as it has copy-on-write feature, with synchornization and snashots.