You can also use AttributedString functionality. So on this way underline will also always be valid for localized texts with underlinedText which takes e.g. two lines. The solution from Ina on the top doesn't work for me, but inspired me to try this way out and it works!
private var attributedString: AttributedString {
var attributedString = AttributedString("underlined text")
attributedString.underlineStyle = .single
attributedString.baselineOffset = 5
return attributedString
}
var body: some View {
Text(attributedString)
}