Not a solution, but the best I could come up with in SwiftUI is to split the text into paragraphs and allow copying each one individually:
let text = """
Multiple URLs here, such as https://stackoverflow.com
or https://www.google.com
"""
LazyVStack(alignment: .leading, spacing: 0) {
let texts = text.split(separator: "\n", omittingEmptySubsequences: false)
ForEach(Array(texts.enumerated()), id: \.offset) { _, text in
Text(LocalizedStringKey(String(text)))
}
}
.textSelection(.enabled)
Sadly the .textSelection(.enabled)
only allows selecting everything at once on iOS.