>After the water was gone, only liquid NaGHB remained in the pan which was placed in the fridge for a few minutes and the NaGHB solidified.
There is no need to refrigerate. The melting point of NaGHB, 145-146 degrees celsius, is much higher than room temperature.
>Now the foil was removed and it was found that the back of the foil as well as the pan was covered by a sticky, almost glue-like liquid. At first it was supposed to be liquid NaGHB but it didn't solidify even after several hours. The taste was equal to NaGHB.
Surely there was a hole in the foil somewhere. Otherwise aluminum foil has some strange properties I did not know about. But why even bother with the foil? If for some reason you are afraid to buy lab glassware, go to a cooking store and get a clear glass saucepan (clear so that you can see when the product is burning). That will work better than what you have right now.
You said it did not solidify after several hours, but earlier you said it solidified after a few minutes (which makes more sense). Which is it?