Former Ford dealer tech here. There was, I believe, a TSB relating to the loose door/window trim pieces you've described. I changed lots of them due to the teeny tiny retainer tabs not holding properly. You should be able to buy new ones fairly cheaply from your local Ford parts department. Alternatively, a good adhesive such as windshield urethane can be used to glue them in place.