## Shortcode in Gutenberg block or do_shortcode

Question

I am wondering which differences there are between to put a shortcode in a Gutenberg block and using the do_shortcode function.

In particular, I wonder why the function

has_shortcode($post->post_content,$key)


doesn’t work if I use do_shortcode, but the same control is working correctly if I put a shortcode directly in the page using a Gutenberg block.

Is that a bug?