Thank you for the quick reply. I need the SVG for an online software in which the paths are read out. In the meantime I found out that it was caused by the saving settings (Save as SVG in Illustrator) and that the problem is solved. (Checkbox "Preserve Illustrator Editing Capabilities" has to be deactivated)
"Save as" will create legacy SVG code. "Export for screens" makes more modern code.
Since "Preserve Illustrator Editing Capabilities" is deactivated by default I'm wondering why you turned it on. Remember that SVG is not a native file format of Illustrator. Illustrator is famous for not being able to correctly read the SVG files it saved.
So SVG is a presentation format only. It's not suitable for roundtripping.
For editing save as AI and use only that for later edits. And then export your SVG.