How can I prevent the hose in the toilet tank from popping out of the tubing?
That tube is supposed to be attached (often with a metal clip) to the overflow tube.



It shouldn't just be inserted down into that larger diameter plastic tube (overflow tube), since as you've found, it will pop out again.