This problem also showed up for me while using libgdx on Ubuntu 20.04 with openjdk-11.
After a longer struggle I tried another jdk vendor instead of openjdk. This solved my issue. For some reason adopt-opendjk-11 works, while openjdk-11 was not working.