In some social situations in the US when I want to leave, I try to sneak out of the room without being noticed. I don’t see this as rude, but as polite because I don’t want to disrupt the conversation. In Sweden, it is common for people to say goodbye (and hug if you’re good friends) when they leave an event. It was a bit strange and awkward for me at first, but now I’ve come to see this as a good idea in case people want to talk about you when you leave or if you’re secret stalker wants to follow you home. But honestly I think it’s a good idea.