Notice he said AFTER the flood.
IIRC, Methuselah actually means, “When he is gone, judgement will come.”
When I was a kid and bored in church, i started adding up all the ages in the bible...and if you do the math Methuselah died in the flood. Sort of like a 98 year old getting hit by a bus.