Board Thread:Questions and Answers/@comment-27003142-20160217210943/@comment-27617597-20160220001004

I believe that Frisk got to the surface after defeating Flowey, since Flowey was able to get past the barrier.