This is a known issue in Elementary OS due to their somewhat non-standard way of applying window decorations. Fortunately, there is a fix, but it must be applied on a per-application basis. In fact on the issue description itself on GitHub, there's a summary of how to fix it with Eclipse as a sample:
For those wondering how to change the .desktop file appropriately, set:
Exec=env GTK_CSD=0 <executable path>
For example for Eclipse I did this:
Exec=env GTK_CSD=0 /opt/eclipse/eclipse
So you'll want to edit the eclipse desktop file to add that
GTK_CSD=0 as an environment variable added before Eclipse executes.
You could also probably use App Editor to do the same, if you prefer a GUI.