You should post your concerns under the "Skilled Worker" forums where fellow nurses can help you out. I'm not associated with the medical field, so I cannot say one way or another. But try that forum and you will be helped.
Your work should still count even if you were out of status for those 2 months. I'm not completely sure about this. I hope other members can shed some light on your case.
I'm not sure about what PMM said. I have hear of people's work being counted even if it was performed illegally. I'm not 100% sure on this, but you can check with the CHC first.
If you were paid for your work, then it should count. I would say consult a good attorney on that because you will be able to get more points if it's counted.
Visitors visa is usually extended with good reason though. If they do, it's for another 3 months or so in most cases. You can apply and see what happens.