.Graphics on windows / controls etc… is no longer allowed (it was deprecated a long time ago). You must use the graphics parameter passed in the Paint event. This can be passed to another function as a parameter if required.
I imagine holding onto the graphics parameter in a property would not be a good idea.
Because the OS finally hardened the rules about accessing the graphics context, so Xojo followed suit. It used to cause subtle, hard to track down errors, anyway, so it’s a good move.