Minato says since that Anrokuzan is dead his spell wore off, which made them travel to the past, and that they won't remember the events that happened when they return.
His spell wore off, which made them travel to the past, and that they won't remember the events. This is what Minato says. These events happened. They return. That Anrokuzan is dead.