How can I make my character instantly stop falling when landing on sloped ground?

I check whether the player is grounded using the OnCollisionStay method and I set the velocity of the rigidbody to 0. However when falling onto sloped ground, the player slides down the slope after colliding with it just for a frame before coming to a sudden complete stop.

OnCollisionStay runs each frame and so is synced with Update, not with FixedUpdate. You only really need to set RB.velocity just the once, when landing so best use OnCollisionEnter.

You may also get better results if you use a RayCast so that, when the falling player is, say 0.01f from the floor, set it on the floor and set velocity to zero at that point.

For belt and braces, you might also want to consider applying a Physic material with high friction so there is less danger of residual motion.