How to clip / cut / filter / extract bounding box / radius around given point of gpx file WITHOUT altering the gpx file content otherwise?

I want to extract and save an area around a given lat/lon of a gpx file and remove all the remaining points.

I tried

gpsbabel -i gpx -f favorites.gpx -x radius,distance=500K,lat=64.9830,lon=-18.1074 -o gpx -F output.gpx

When I use gpsbabel for that, gpsbabel rewrites the whole file, changing the format, inventing new tags etc. Is there any tool for just extracting, leaving the file untouched otherwise?