Stupid me....I thought I never solved it (it's been a long time ago when I tried to solve this issue), because using a grid didn't fix the problem when I tried it today, so I assumed that it wasn't the solution.
It turns out that it IS the solution.
The reason why I didn't see any difference was because Preferences / Guide, Grid & Slices was set to a Grid Line every inch. You need to set this to pixels, something like 40.
But there is more to this and I didn’t discover this in the past, but only today after doing some experiments. The other issue is subdivisions. The number of pixels divided by the number of subdivisions should result in a round number.
So you solve the issue for example by using 40 pixels and 10 subdivisions, since 40/10 results in 4.
On the other hand, 40 pixels and 6 subdivisions will not solve the issue, because 40/6 = 6,666…
I hope it wasn’t too technical, but this is basically how the workaround works, because I still consider it a bug; we shouldn’t have to do all this to make sure that it always snaps to a pixel.
Happy Photoshopping. 