Java Splash Screen forcing itself on top on Mac

So, I have a splash screen for when my application is loading. It uses an image called loading.gif while loading.

The main problem is that the splash screen will force itself to show on top of applications on the Mac. Even if you try to click another application like Notes, Notes would gain the focus, and you can edit Notes; however, the splash screen would stay on top.

This issue oddly does not happen on Windows.

EventQueue.invokeLater(() -> {
    SwingWorker<Object, Void> worker = new SwingWorker<Object, Void>() {
        protected Object doInBackground() throws NullPointerException, IllegalStateException {
            loading = SplashScreen.getSplashScreen();
            int height = 210, width = 410;
            Graphics2D g2d = loading.createGraphics();
            g2d.fillRect(0, 0, width, height);
            return null;
    try {
    catch(InterruptedException | ExecutionException e) {

Here is a link to a test .jar file in which the issue can be seen on Mac. Here is a link to a test .jar file in which the issue can be seen on Mac: