Kent Boogaart (https://kent-boogaart.com/) provided a workaround.
Here is the final code with his input.
Image of a FrameworkElement element can be saved by:
double width = element.ActualWidth;
double height = element.ActualHeight;
int pixelWidth = (int)Math.Round(width);
int pixelHeight = (int)Math.Round(height);
var bmp = new RenderTargetBitmap(pixelWidth, pixelHeight, 96, 96, PixelFormats.Default);
var drawingVisual = new DrawingVisual();
using (DrawingContext dc = drawingVisual.RenderOpen())
{
var brush = new VisualBrush(element);
brush.ViewboxUnits = BrushMappingMode.Absolute;
brush.Viewbox = new Rect(element.TranslatePoint(new Point(0, 0), element), new Size(width, height));
dc.DrawRectangle(brush, null, new Rect(0, 0, width, height));
}
bmp.Render(drawingVisual);