Neither of these are, in fact, the only solution.
We could, for example, have heights that identify other cars in the road and selectively dim the area around those cars.
We could have headlights that keep light below a certain level accounting for both the attitude of the car and the oncoming terrain.
Really how it is achieved doesn't matter, the regulation should just say that, within some cone in front of the vehicle, light levels must be limited to below x for the window areas around any other vehicles.