Collisions are calculated with some margins, they are not precise enough to handle 0.0 gap clearance. There is a safe_margin property on the CharacterBody2D, but you can’t set it to 0.0 and expect it to work properly.
Your solution with lowering the body’s shape by 0.5px seems fine to me. I would leave it in, unless you encounter any further issues due to that in the future.