I just minimise my game and have my audio settings set to mute game sounds whilst window is inactive. That way I don't hear the game sounds whilst I'm afking. Either that or I mute my sound entirely if I'm afk for a lot longer. I can't be bothered with logging in and out all the time, if I stay logged in, when I'm ready to play again all I have to do is select my character and wait a short while in a queue.