Use “second-depth shadow mapping”. In other words, render the back-faces of the triangles into the shadow map instead of the front ones. As long as all of your objects are closed surfaces, this will work.
You also want to make the distance between the two clipping planes as close as possible when drawing the shadow map. Pushing the near clipping plane out has a greater effect due to the way the z-buffer is implemented.