After deforming the space with a sine function there is no problem in calculating the gradient. The problem is calculating the new correct distance to the nearest surface after a space transformation. You can see this problem in 2D, here I made an example https://www.shadertoy.com/view/NtsSRf
SDFs are another tool. Very useful for content creation, for example, although there are still very few tools to create SDFs. You can't create SDFs in Blender for example. SDFs will be more used in the future, polygons are a mess... :) Games like Dreams (PS4 / PS5) make extensive use of SDFs