How to clear / erase a rectangle from a shape's graphics?

This is how i "paint" on a shape:

this.myLayer = new Shape();
this.addChild(this.myLayer);

const graphics = this.myLayer.graphics;
graphics.beginBitmapFill(image);
graphics.drawRect(x, y, w, h);
graphics.endFill();

frame.stage.update();

What it i want to clear / erase a certain portion of it?
I can't "paint" a white rectangle, since the background should be transparent.
Is it possible?

This can be written like so, if you desire:

this.myLayer = new Shape().bf(image).dr(x,y,w,h).ef().addTo(this);
S.update();

I know of a couple tricks to "erase".

  1. write a mask shape on top and mask a copy of the background

  2. use winding - where some shapes will disappear if twisted in the right direction

  3. use a blendmode - for instance ble("destination-out") to cut to the canvas