If a monk uses a staff or another versatile weapon twohanded, does it still count as a monk weapon?

Yes. A monk weapon must lack the two-handed property, but nothing prevents a monk from wielding such a weapon with two hands. Fundamentally, a monk weapon counts as such no matter how a monk uses it.