I've had a lot of good experiences using: github.com/AngusJohnson/Clipper2
I'ts very easy to get your 2d polygon data into it, excellent OSS license, lots of operations besides, union and difference, and very fast, much faster than GPC, even when using large point sets.