You can go to a craft store and buy a sheet of adhesive felt, it's literally a dollar:
https://www.michaels.com/creatology-...caAiQuEALw_wcB
Cut the sheet into ~0.2" strips and adhere those to the brake light housing where it touches the base, but not too much such that it doesn't click in anymore. Should take care of the rattling.