So, I just "nonsensically" tried my other lens and body caps of different mounts and brands to see if they would fit. To my surprise, the K-mount lens caps do fit well for the Sony E-mount lens!
Here it is:-

In fact, I've found that the width of space from the mount flange to the bayonet petals are almost identical. So, the lens cap does fit very well and tight when "mounted". I have also tried EF and micro-4/3 ones, but there is no luck and they do not fit in any ways, completely.
However, a more careful inspection will reveal that the mounted Pentax lens cap is actually slightly de-centred, which I suspect is caused by a minor difference in the inner diameters between the mounts.
To compare the outer and inner diameters of the E-mount against the K-mount, I put a semi-transparent original Pentax body cap onto my NEX body:-

Well, it can be seen that the outer and inner diameters are almost the same! The Pentax body cap does NOT fit the NEX body though, as it has more depth.
So, all these coincidences are just interesting, aren't they?