I received a bunch of photos that didn't have any correct metadata. I have then manually corrected the time and gps information within the photos app. When I export this files, those information are gone. They are not visible in the exifdata. What can I do to get an image out of photos without loosing all those edits?
Metadata edits and location information assigned using the Photos application exist only in the Photos library database. The Photos application does not modify your original images. I.e. it does not write EXIF / IPTC geotags to your image files.
The Photos application can bake some of the metadata into JPEGs you export. These are JPEG copies of your images with your adjustments applied. You need to allow the Photos application to include location information for published items. There is a setting for this when you export photo. A second setting in Photos > Preferences applies when you use drag-and-drop to export photos.
You should consider proper geotagging that writes GPS location information into the your original image files. Be sure to use a tool that does so without compromising image quality by recompressing JPEG files. Writing GPS tags to EXIF metadata within the files creates files similar to what a GPS-enabled camera produces. You can be sure that the information always stays with your image files even as you move to a different photo software.
In Photos for Monterey and Big Sur, data added via the Info window is embedded in the metadata if you do File > Export > Export N photos, and check mark 'Keep Title, Keywords, Caption' and 'Keep Location'. Description and GPS data are updated in EXIF Info and Caption, Title and Keywords in IPTC Info.