First you need to render you scene to a Frame Buffer Object (here is a good course on FBO: https://learnopengl.com/#!Advanced-OpenGL/Framebuffers)
After that you will end up with a Texture (of type GLuint) containing your rendered scene. To print it into Dear imGUI, just call a Draw Image Command.
EDIT New (simpler) Example:
In essence, You need to make sure that the style that is used has wordwrap set to true.
The problem with what you tried is that the style you edited isn't used by the TextArea.
Which style is used is actually a weird one, as I expected EditorStyles.textArea but for some reason, unity uses EditorStyles.textField as the default style instead...(which has ...
The problem is though that this binding has encapsulated the input callbacks in a global .cpp file which makes it impossible to access for other classes.
The imgui+GLFW backends have callback exposed in the imgui_impl_glfw_xxx.h file:
void ImGui_ImplGlfwGL3_MouseButtonCallback(GLFWwindow* window, int button, int action, int mods);
It was a "rounding error". When you encounter similar bug then make sure your ImGui window/Image inside window are on rounded position. In my case "float x" variable was 39.5f and when I ceiled it everything was rendered correctly. Also you can check if your image size translates to the integer factor (e.g. it's drawn at 1x, 2x, 3x etc. ...
As noted in my comment, it could be a rasterization/sub-pixel issue.
The line thickness is small enough that during the rasterization process the lines end up between the pixels and are being discarded.
Try increasing the line thickness to see if that fixes the problem.
The Cherno on YouTube did something similar for his Scene Viewport in his Game Engine series.
It's written in C++/OpenGL/ImGui, but it's easily translated. From a high level, you need to create a viewport panel/window that you draw to as a "Scene Viewport".