Josep Maria Marti achieved a third win of the 2025 Formula 2 season, holding off a final lap attack from rival Alexander Dunne to take victory in Budapest.