Okay. If you still prefer to not having it add the below javascript in your discourse customization. It’s working fine for me as you wanted.
<script>
jQuery( document ).ready(function() {
$('#main').on('click', '.widget-button.share', function () {
var url = $(this).attr('data-share-url');
var i = url.indexOf('?');
if(i > 0)
url = url.substring(0, i);
$(this).attr('data-share-url', url);
});
});
</script>