What if the graph is not connected?
A disconnected graph is bipartite only if every connected component is bipartite. You cannot run BFS from one node. That only checks one component. You need an outer loop: for each unvisited node, start a new BFS. If any component fails, the whole graph is not bipartite. Only if all components pass is the graph bipartite. Forgetting this outer loop is one of the most common bugs.