I haven't play with MED manipulation with BGP route making decision with not only FortiGate but any other routers like Cisco, Juniper before so my comments are NOT from my real experience.
But in my understanding is MED is one of metrics when the route-sending side can use to influence the route-receiving side to make routing selection decision by attaching to sending routes. Not for the receiving side to change/set before the BGP route selection.
So I'm not sure your way, setting it when your received, would change the selection. Even if it does, that's probably not the best way for your purpose because of the next reason.
MED is 6th priority in the metric list of BGP with FortiGate as in the KB below:
https://community.fortinet.com/t5/FortiGate/Technical-Tip-BGP-route-selection-process/ta-p/195932
Have you checked other 5 higher priority metrics on those two default routes? Likelihood is that other metrics might be deciding it.
Instead, if you want to prefer a default route advertised from one neighbor over another one from another neighbor, the most common and effective (it works almost 100% of cases) way is to set a lower local-preference (higher priority metric) such as 99 for the unpreferred neighbor's default route with "route-map-in" while don't set the local-preference (by default 100) for your preferred neighbor's default route. This generally works universally for other vendors routers as well because local-preference is particularly designed for this purpose on the receiving side.
Toshi