C# Issue with saving .DGN file that includes raster image to .DWG

Hi,
I have .DGN file with attached raster image (for example .PNG) and want to save it into .DWG file. During saving something going wrong and as a result when I open .DWG file in DWG TrueView 2016 I have an empty area (just a frame) instead of raster image (see attachment). But when I open this .DWG in MicroStation everything works correctly and image is displayed on its place. Otherwise when I save this .DGN file manually from UI everything works correctly, no matter where I open it.
I try to do this with the following code, is it correct or not? Or maybe I miss something?

var connector = new ApplicationObjectConnector();

var app = connector.Application;
app.Visible = true;

try

{

//MS_DWG_REFERENCE_EXTERNAL
app.ActiveWorkspace.AddConfigurationVariable("MS_DWG_REFERENCE_EXTERNAL", "Retain");

//MS_DWG_REFERENCE_SELF
app.ActiveWorkspace.AddConfigurationVariable("MS_DWG_REFERENCE_SELF", "Merge To Cell");

//MS_DWG_NONDEF_DESIGNMODEL_ATTACHMENTS
app.ActiveWorkspace.AddConfigurationVariable("MS_DWG_NONDEF_DESIGNMODEL_ATTACHMENTS", "Merge To Cell");

//MS_DWG_REFERENCE_MASKED
app.ActiveWorkspace.AddConfigurationVariable("MS_DWG_REFERENCE_MASKED", "Retain");

}
catch (Exception){}

var doc = app.OpenDesignFile(dgnFilePath, true);
doc.SaveAs(dgnFilePath, true, MsdDesignFileFormat.msdDesignFileFormatDWG);
app.Quit();

Thanks.