Why re-saving is the wrong way to do this
The usual method is to draw the photo onto a canvas and export it again. It works — canvas export writes no metadata — and it also decodes and re-encodes every pixel, which for a JPEG means a second generation of lossy compression.
The damage is small on one pass and cumulative. Strip the metadata, later resize, later strip again, and the artefacts compound: soft blocks around edges, mottling in smooth gradients. The photo gets quietly worse each time, and because each step looks fine on its own nobody attributes it to the metadata tool.
A JPEG is a series of segments: some describe how to decode the image, some hold the compressed data, and some carry metadata. Removing the third kind and copying the rest is a structural edit. The image data is never decoded, so it cannot be degraded, and the result is bit-identical where it matters.