They do it when stressed. They will hide after that, until new feathers grow.
But, you can still feel it moving inside the tube. You should leave it alone for a while for a few days. Then shake it a little to see if it has gotten rotten. If it died and it’s been in your tank for a few days, you will notice like black-brown ink coming out of the opening of the tube.