So in terms of diplomatic relations, the host country (Here, Venezuala) can expel a diplomat of another country. This is normally done by the Head of State (in countries which have a separate Head of State and Head of Government) declaring the Ambassador "Person Non Grata" and kicking them out. When an ambassador is withdrawn from a host country by his/her appointing country (i.e. The USA) it's not symbolizing that the appointing country does not recognize the legitamant authority of the country, but rather, that the two countries' relationships have reached such a low point that they no longer wish to have diplomatic relations at all (Even then, this isn't a hard stop... Most countries that withdrawl and expel ambassadors will name a third nation as a Protecting Power to represent the interests of Nation A and Nation B. An example of this is that the U.S. and Iran have not had formal relations with each other since the Iranian Hostage Crisis, but the U.S. has named Switzerland as their Protecting Power in Iran, on the off chance a U.S. Citizen gets in trouble.).
What is going on here is a horse of a different color: Maduro has said that the U.S. Ambassador is "Person Non Grata" and is looking to expel him (or her). However, the United States is claiming that they do not recognize Maduro as the legitimate authority to expel an ambassador and thus the ambassador will continue the mission until the leader the U.S. does recognize decides to expel him.
The first question that this raises is can't the Venezuala military kill the U.S. Ambassador over this. Well, yes... but that's a very stupid idea as the United States Embassy is technically U.S. territory and if the military enters the property, the U.S. could use this action as a cause for war. Maduro can barely pay his army, and assuming he is a rational actor, he isn't about to just give the worlds largest military (which has also just happens to have a reputation for invading oil rich countries of late) a very legitiment reason to invade... And that's before we get to the buisness of his own military not being so loyal to him as to want to wage war on the U.S.