How to reach the hidden ending in Far Cry 6
The hidden ending unlocks a trophy.
How to unlock: Simply sail off the edge of the map by boat, or fly over the edge by plane/helicopter. It works anywhere regardless of the exact location or direction you leave the map. As you get closer to the edge, it will say "Leave Yala. Turn around!" at the top of the screen. Just continue past the edge of the map and a cutscene will trigger with the secret Miami ending. Afterwards, you'll be placed back on the main map with all your progress intact (no progress is lost, the game isn't actually over). After this you are still free to roam and proceed to the true ending. This can only be done before completing the main story. If you've completed the main story, the secret ending is no longer available, and "Out of Bounds" will be displayed instead of "Leaving Yara" when trying to exit the map, so this is technically ignorable. However, you can get it in the new game as soon as you find the ship/plane/helicopter.
The guide to unlocking the hidden ending of "Far Cry 6" is here. Go and unlock this hidden ending.