Cannot clip a path that contains a round rectangle?

I am working on a very graphical UI where a lot of design is done in a background canvas’ paint event.
As I need to draw a picture on a gradient pane that has round rectangle corners, I use this snippet to make it not overlap:

var clip As New GraphicsPath
clip.AddRoundRectangle MenuWidth, 0, g.Width - menuwidth, g.Height, 60/ScaleFactor, 60/ScaleFactor
g.SaveState
g.ClipToPath(clip)

Works nicely on macOS. Does not work at all on Windows, where I run into an

UnsupportedOperationException: Cannot clip path that includes a RoundRectangle.

Docs do say ClipToPath is not available on console or web apps, but this is a desktop app. A Xojo or a documentation bug?

156 / 5.000
I always use PixMapshaptes to draw pictures in different sizes and shapes. These can also be rotated and scaled
also under Window11

Var bild As New Picture(300,300)
bild.Graphics.DrawPicture mypict,0,0,300,300,0,0,mypict.Width,mypict.Height
Var maske As picture
maske = bild.copymask
maske.Graphics.ClearRectangle(0,0,300,300)
maske.Graphics.drawingcolor = Color.Black
maske.Graphics.FillRoundRectangle(0,0,300,300,50,50)
bild.ApplyMask(maske)
px = New PixmapShape(bild)