I've been having this same issue in my local Minecraft server on the official 1.16.5 version and I found that it only changing the server address from "localhost" to my local IP "192.168.1.*" it made the image change to expected size. Then changing it back to "localhost" made the image appear again, hence and repeat. Also changing it to "localhost:25565" (the default port I use) makes the image look normal.
The funny thing is that the server wasn't running at the time of the changes and yet the effect was instantaneous, thus the problem has something to do on how Minecraft client handles the server icon when the address is exactly "localhost".
I've been having this same issue in my local Minecraft server on the official 1.16.5 version and I found that it only changing the server address from "localhost" to my local IP "192.168.1.*" it made the image change to expected size. Then changing it back to "localhost" made the image appear again, hence and repeat. Also changing it to "localhost:25565" (the default port I use) makes the image look normal.
The funny thing is that the server wasn't running at the time of the changes and yet the effect was instantaneous, thus the problem has something to do on how Minecraft client handles the server icon when the address is exactly "localhost".