No problem
As long as the H1B holder return to the same employer for a reasonable time, he(or she) can change job and file an H-1B transfer. Such transfer can be made even before the H1B expires. But remember, must return to the same employer first to hold H1B status. My wife had the same exprience as you asked.