If you have resistance 5+ on you won't take any damage as intended as long as you don't have armor equipped.
However if you have armor on you will take damage.
Damage sources tested: lava, fall and mob damage. (Doesn't seem to effect fall damage.)
Does work as expected on java 1.16.
Might be related to MCPE-82952