At first I though maybe the hiding in the chest thing and still getting caught was a bug of some sort but then I quickly realized the mechanics of the game require you to hide from peach before she enters it and she doesn't take notice of you because, once you lock eyes with her she will find you its basically an automatic L