Hey! I got that Cracker Jack toy in my 2006 door too! It’s the glass rear edge guide. Seems like they all suffer from the same manufacturer flaw. My unit has been disassembled and waiting for me to weld the bracket back to the track (as soon as I learn to weld).
The left end of the bracket is the top and the clip slips onto a mounting point that is attached to the base of the rear window track that continues above door skin.
I circled the bolt holding the bracket in your pic. The edge guide has a part number so, I would imagine that you could order from ford, find one in a salvage yard, make a repair, or just do what I and boywonder did, ignore it. It’s been almost 2 year for me.
Edit: Sorry just read you solved. Not sure why I did not see it before responding.