@Susan Garcia great question, and honestly exactly the kind of use case the module was designed for.
The 2Mbps is standard LE 2M PHY and the long-range capability runs on LE Coded PHY (S8 coding) — so yes, those are two distinct PHY modes you switch between explicitly, not some proprietary abstraction happening underneath. What the RF front-end is doing on top of that is where the magic is: the external PA/LNA stage is always active, but the real receiver sensitivity gains that push you into the 50km territory come from the combination of the amplifier chain and the coding gain from LE Coded PHY working together. You're not getting 50km on LE 2M — that's drone-to-drone on Coded PHY with the amplifiers doing their thing and no ground reflections eating your link budget.
For your adaptive switching use case, you'd trigger a PHY update procedure when RSSI crosses your threshold — standard HCI_LE_Set_PHY command handles the negotiation. The tricky part is tuning your RSSI thresholds well enough that you're not constantly flipping back and forth at the boundary, so a bit of hysteresis in your logic will save you headaches.
If you want to dig into the specifics of how the front-end config behaves during PHY transitions, worth opening a thread in the Dev Hub resources section or pinging through the AI firmware builder — it can generate the PHY switching logic with RSSI-based fallback pretty cleanly if you describe your threshold requirements.