Using following code in ArcGIS Pro 3.4.0, selected features are not drawn using selection symbology.
If layout is exported manually, selected features are exported.
In ArcGIS Pro 2.9.9 selected features are exported as well.
var layoutItem = Project.Current.GetItems<LayoutProjectItem>().FirstOrDefault();
await QueuedTask.Run(() =>
{
Layout layout = layoutItem.GetLayout();
layout.Export(
new PDFFormat
{
OutputFileName = "selected_features.pdf"
},
new MapSeriesExportOptions
{
ShowSelectedSymbology = true,
}
);
});