This is my 2¢ opinion.
Such shooters usually (not always) do not want to be taken alive. It is sometimes their last act of defiance. Kill as many innocent people as possible, especially if a police officer, and then before being arrested, end their life or be killed by the police so as to keep anyone from seeking retribution. It’s like, I created mayhem and killed people and there’s nothing you can do about it.
Starting at Columbine, that seems to be a common motive. When Klebold and Harris figured out that they were cornered and/or had run out of easy targets, they each committed suicide. Before that the police had fired about 140 rounds. So Klebold had Harris didn’t mind exchanging fire with the police, knowing that they were eventually going to end it.
In the Mildland shooting it would not surprise me either way that the police killed the shooter or (perhaps more likely) he killed himself.