Imitating Graph-Based Planning with Goal-Conditioned Policies