Hardware store/plumbing supply element is slightly different in that the gasket on those units has a square cross section. They fit and they screw in, but there is no way to make them not leak. We worked on it, our mechanic worked on it, no joy.
The original element has an o-ring gasket. We even tried swapping out the square gasket on the hardware store element with an o-ring. Still leaked.
Short of a miracle, I think we're looking at a new water heater, which is a shame because the original is in excellent condition other than the fact that it doesn't have a working element.