Window cannot properly resize on Linux, GNOME

I am running Pop!_OS 20.04 LTS, with GNOME version 3.36.3
When I run a resizable sketch, resizing it will often only resize the window, and fill the empty space with junk data, while keeping the sketch the same size. Often, the sketch will be slightly bigger than the window bounds. I have included a screenshot that displays this happening.

I have tried restarting GNOME several times, and restarting my computer.
An interesting thing to note is that this issue does not occur when I use the FX2D engine, however I am creating a project that requires the default engine.

This did not happen on windows.

Does anybody know of a way to solve this problem?

I have figured out how to implement FX2D into my project, but I will leave this open in case someone else has this problem.