Localization inside shortcode not working

esc_html_e() displays (echo) the output, hence it appears at the wrong place. So you should instead use esc_html__() which returns the translated string.