Research shows this is not the case. Even when code mixing, bilinguals understand what language their partner speaks. For example, this child mainly uses Spanish and Slovene at home. But at school he mainly uses English to match the language of his teacher and peers.
Bilingual children may use code mixing when they do not know a word in the language they are currently speaking. If they know the word in their other language, they use it to fill the gap. Simultaneous bilingual children rarely break grammatical rules of either language when they code mix. Their linguistic knowledge is quite sophisticated!
Code mixing does not mean a bilingual has a language delay or inability to keep languages apart. In fact, even adult bilinguals use code mixing! It is an effective strategy that bilingual children and adults use to support communication.