The plugin to allow users to delete their own account from the frontend – WP Frontend Delete Account has been updated to 1.6.0.
The new release contains the changes to make the compatibility with WordPress 5.9 released in late January and various other bug fixes to make the account deletion process even more smooth.
[For Nerds] What’s been the changes?
After that, I added the question in the WordPress support forum where I found the approach of using wp_localize_script() wasn’t correct – it shouldn’t be used from within the shortcode callback. We should also use wp_add_inline_script() to pass generic data from PHP to page script. So, it turned out to be a bug within the plugin. Thanks to @bcworkz