Found solution: not using MediaStore.Images.Media.insertImage to add file to gallery but doing similar by MediaScannerConnection:
MediaScannerConnection.scanFile(
getApplicationContext(),
new String[]{file.getAbsolutePath()},
new String[]{"image/*"},
new OnScanCompletedListener() {
@Override
public void onScanCompleted(String path, Uri uri) {
Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
shareIntent.putExtra(Intent.EXTRA_STREAM, uri);
shareIntent.setType("image/*");
shareIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
startActivity(Intent.createChooser(shareIntent, getString(R.string.export)));
}
});