GPT PMBR size mismatch on Ubuntu 24.04

I am not sure this is even a packer issue but maybe someone can provide some insight.

We are building our final images like this

  1. Build a “base” image based on GCP Ubuntu 24.04 which installs some things all our images need
  2. Build an “application” image on top of base image which only installs application specific stuff.

We use 10G disks for these builds. This used to work fine on 22.04 but after moving to 24.04, it seems something changed in the OS. Our final VMs use 50G boot disks but cloud-init fails to expand due to: GPT PMBR size mismatch (20971519 != 104857599) will be corrected by write.

The backup GPT table is not on the end of the device.
Disk /dev/sda: 50 GiB, 53687091200 bytes, 104857600 sectors

As a result root partition is only 8.7G instead of taking the majority of 50G boot disk.

Weirdly enough, provisioning a final VM using just the base image seems to work just fine.