Polygon subtract

Is there a way to substract an area polygon from another polygon, analogous to that there is the join overlapping areas feature in JOSM?

More specifically, suppose there’s a forest polygon F. I’d like to draw a residential area R at the edge of the forest. Therefore areas F and R share an outer segment and R is a sub-area of F. Once there’s those two areas, I’d like to simply select both the areas and click some sort of “substract area”, so that the area R would be removed from forest F. It would effectively move the outer segment of the forest to use the remaining segment of residential area so that the areas would no longer overlap.

Now, while this is not difficult with JOSM especially with a plugin like contourmerge, it still needs quite a few clicks. Is there another plugin or some other method to do the subtraction easily?

Multipolygon solves this for areas that are fully inside another, but it cannot be used when the outer segment is shared (nothing wrong with that).

Did you try Alt+X “split area” https://wiki.openstreetmap.org/wiki/JOSM/Plugins/utilsplugin2 ?

No, but now that I did try it, it’s actually pretty close! I didn’t realise that it can be used for this case.

The usage pattern seems to be slightly different from the suggestion above. To use this, I need to draw a segment that defines the intersection only, without the outer edge, and the splitted area is generated. A few caveats remain, the plugin requires that there’s at least one unneeded node at the outer edge (I suppose this check is because of the simpler use case), and while splitting a multipolygon the splitted part needs to be manually removed from the relation. But thanks, it works!