Simple answer, you likely can’t do this easily.
In SDL version what you are getting on screen is image content, the glyphs are cached and later output to SDL_Rect.
To be able to copy from the window you’d have to do some kind of raw capture + OCR to get it back to pure text.