I've managed to fix this by doing the following: Click the settings icon in the upper right corner of Paint.net 4.0, and turn off "Hardware accelerated rendering (GPU)".
I had constant crazy resizing of my Paint.net window when screen-sharing in Discord. It kept showing and hiding the menu bar at the top, and zooming and unzooming the draw area whenever moving my mouse through the space. Disabling this setting in Paint.NET immediately resolved the flicker issue in Discord. It resizes only the moment you move, and stays resized until you've stopped moving the mouse for a period of time. This is not at all disorienting, whereas the constant resizing with hardware accelerated rending was disruptive and made the combination of apps almost unusable.