WARNING! Curmudgeon answer coming. It is built into the software that shifts the M40 on the diesel. It is my first vehicle that also shifts down going downhill and I dislike it. My kids and most people that have owned recent cars say “they all do it” Mine used to do it less but with each successive computer flash it is more prevalent. I use the M mode a lot and just push it over to D when I am coming to a stop. I am so used to it now I just do it without thinking.
BTW I believe the gasser’s automatic does this too. Welcome to the 2010’s
When someone has a computer hack that lets us get at the settings mine will not shift down or slow these downhill sections, that is what the M and the brakes are for. Brakes are cheap to replace, engines and transmissions are not so I use the brakes.