Lithium-ion fires are hard to extinguish, especially with thermal runaways. There are flame retardant products that can extinguish lithium-ion fires, Class D extinguishers can be used.
I would guess the fire crews that responded were not equipped with this type of extinguisher.