If you want to I added some foam between battery and top of xiao to make it tight.(so you can slide the switch without it moving in there.
I modified the pins and put them on top to lower the Xiao as low as possible (see pic)