Question regarding a taskkill command

It happens here on Windows 11, that some applications garble my taskbar icons, which i prefer to have centered (i have only few of them).

So i made a button launching

taskkill /f /im explorer.exe
explorer.exe

which seems to work fine so far. Anyway, i'm not sure if it's the best way to tackle the problem. Are there any drawbacks, or a less harsh solution?

Explorer is unlikely to be the root of the problem, making it only a temporary solution. However, since it's a low-risk operation that merely rearranges a few icons, you can continue using it for as long as necessary.

Thank you! The garbled icons are a known problem in at least Windows 11, and as so often, Microsoft wasn't able or willing to fix this. It happens after my DAW was crashing, which happens sometimes, leaving a blank screen, until the GUI comes back up again.

Ah, I see. I wasn't aware of that (what are garbled icons?).

Restarting Explorer is probably the best option anyway. You could omit the /f flag (force) to allow Explorer to restart gracefully in case it's handling something important, and you don't want to be too abrupt.

Alternatively, you could gentlemanly use Task Manager:

The icons themselves are ok. But they are in an uneven order, some of them halfways obscuring those behind. If i click the half covered icon, it comes forward, covering the other one. Like here:

https://answers.microsoft.com/en-us/windows/forum/all/windows-11-taskbar-icons-overlapping-disappear/80c822d5-8c3d-4a2c-892c-586608a51eab

And of course i tried some of the tips, but to no avail.