Running GUI Applications in Code-Server

I recently installed code-server on my docker instance and set up python because I wanted to start learning the language. I decided to start by making a graphical chess application, but, unfortunately, I am unable to get the GUI to show up. I am using pygame to handle the GUI. My application runs, but the graphical window doesn’t show up.

Is this a limitation of running code-server in docker?
Are there any workarounds or other methods of getting graphical applications to run in docker?