This answer says that the (enemy) bugbear is part of the combat when he knows about it.
This answer says you can only be surprised at the beginning of combat.
Could the unnoticed bugbear wait until every enemy the party knows about is dead, and then attack to surprise them?
Basically, when does an encounter end, and when does another start?