This can happen if you add the cheese while the sauce is on too high a heat. The cheese only needs to melt into the white sauce, at a low temperature. In fact if you stir the cheese into the sauce off the heat right after bringing it to a simmer, this will be hot enough for the cheese to melt without splitting.