I asked a similar question but couldn’t get any answers. https://support.advancedcustomfields.com/forums/topic/acf-block-that-has-data-if-its-inside-columns-block/
Once method to build this would be to javascript function in the gutenberg editor that would save all parent settings into the blocks attributes. Is it in a column block, how many columns that block has, is the columns block alignfull or alignwide…
Then the template could access those properties and a suitable sizes attribute could be built.