The RPI shutdown sequence is usually only a second or two if it’s fairly vanilla. If you have other stuff running, it can be more.
There’s a way to do the delay posted here