WARNING: This page is about a different car, the 2018 Lincoln Navigator. However, it is still accessible from the selected car via links, so may be relevant.
Detach the clips and remove the trim cover.
Courtesy of FORD MOTOR COMPANY
Disconnect the rain sensor electrical connector.
Courtesy of FORD MOTOR COMPANY
Pull outward on the clips and remove the rain sensor.