How to make shortcodes in Query Loop to get post data

In one WordPress update, shortcodes in query loop blocks that use global $post or get_the_ID() stopped working. This is because context and priority were changed in shortcode block.

But there is quick fix for this, you need to use next code in functions.php

function greenshift_render_block_core_shortcode( $content, $parsed_block, $block ) {
    $content = do_shortcode( $content );
    return $content;
}
add_filter( 'render_block_core/shortcode', 'greenshift_render_block_core_shortcode', 10, 3, );
«
»