To me, that sounds like the OpenGL path of your graphics driver doesn't like the high native resolution of your 4k monitor. It fails creating an accelerated OpenGL context, and then just creates a software one, or lets Windows create a compatibility one that maps to Direct3D, or something like that. Those then often lack a lot of the features, leading to weird graphical glitches and bugs. One thing you could try is to enable windowed mode in KotOR. For that, you need to edit the "swkotor.ini" file in the installation directory of the game. In the "[Graphics Options]" section, there should be a "FullScreen=1" line. Change it to "FullScreen=0" and add a new line with "AllowWindowedMode=1" below that as well. Also, you can set "Width" and "Height" (a couple of lines above), but try 800x600 or something like that for a start.