Hi @arvindsinghu,
Thank you for your reply!
I have tried using both, classic as well as shortcode block in Gutenberg editor to add my custom shortcode. In my custom plugin, I have used add_shortcode() and a callback function displays a message, say, “Hi”. But when I try to save a page after inserting the shortcode that I have created in my custom plugin, I get the publishing failed message yet I am able to view the page and the message “Hi” is rendered using the shortcode on the page. I hope this helps in further understanding the issue.