As the gas shuts off, it has some residual gas that does explode. That can be from some excess gas near the burner that was incompletely burned, or a poorly shutting gas valve.
Check the gas pressure regulation pressure in the burner manifold and check for some small leakage. That can also happen with misalignment of burner parts or one burner orifice clog.
http://www.HeatProUS.com energy businessmen’s knowledge
Yes, you really have to find out the MAKE and MODEL to get good answers. There IS more than one machine made.