Use a latex or acrylic caulk, rather than silicone. Caulk has more flex than silicone sealant.
Also, silicone isn't really mildew-resistant (however, there are some products with BioBan).
DAP Ultra Alex, 'Dow 786' and 'Dow Tub, Tile, and Ceramic' are all mildes resistant.