Worked a treat! Thank you.
Having a similar issue where any spacing attributes I try to set via the Gutenberg editor don’t render on the front-end.
if( !empty($block['style']['paddingTop']) ) {$styles .= 'padding-top:' . $block['style']['paddingTop'] . ';';}
Any ideas?