This rust is the result of water trapped under these moldings. Usually cars have a path for draining the water, better to take out the moldings, use sandpaper to clean the path and paint Oil paint with a paint brush (The thinnest one , just like artists use for giving final touches to their portraits) and wash/clean the moldings from inside and then place them back.
In short, water is not drained and stays there, causing rust