How to stop editor removing space ( ) in the beginning of the paragraph

//[nbsp] shortcode
function nbsp_shortcode( $atts, $content = null ) {
$content="&nbsp";
return $content;
}
add_shortcode( 'nbsp', 'nbsp_shortcode' );

Then call it like this:

[nbsp]

Instead of:

 

Hat tip to this post on wordpress.org: https://wordpress.org/support/topic/prevent-nbsp-characters-from-getting-removed-by-the-visual-editor

error code: 523