On flat and Gorenstein flat dimensions of local cohomology modules