Rectified Lagrangian for Out-of-Distribution Detection in Modern Hopfield Networks