Given an infinite square well, it doesn't matter how thick the wall is, the particle is trapped inside the two walls. If we make the wall of arbitrarily small but finite thickness, the particle is still trapped inside the wall, i.e. it is not possible to find the particle outside of the potential well:
However, if we take a limit of the thickness of the wall to zero, the potential effectively becomes a double Dirac delta distribution. And for this scenario, the derivative of the wavefunction will be discontinuous at the two points of infinite potential:
What is the qualitative difference between finite and infinitesimal thickness of the wall that results in whether the particle is trapped within the walls or leak outside of the walls?