I cut with a thin, flexible cutter knife the foam between the plastic-base of the GoPro mount. Be careful not to cut / poke into the paint. Once the plastic part is removed, the remaining foam can simply be peeled off.
This method does not leave the slightes trace on the paint, if you are careful.