You removed the tank from the printer to clean it, I bet. It was probably detected because you managed to finally insert it correctly, the cleaning had nothing to do with it. It was just that you removed/reinstalled it enough to finally succeed.
As others have mentioned, installing the resin tank can be tricky. It doesn’t provide much mechanical feedback to let you know it’s actually in position correctly. There ought to be a detent, something that “clicks” when the tank is fully inserted. But because there is not, and the tray mounts via a “friction fit”, it isn’t that difficult to end up thinking the tray was fully seated when it was not…