No: the conclusion need not survive without an additional restriction at infinity. A counterexample that keeps the functional finite is and . The distinct functions and both lie in and have energy zero. Their boundary data agree because is empty. For any variation with finite gradient energy,
so both are genuine critical points, not merely formal solutions with infinite functional value.
With nonempty boundary, the classical Euler-Lagrange equation also illustrates the missing condition: in dimension , on , both and are harmonic functions with zero boundary values. The latter has finite Dirichlet energy, because its gradient-energy integral is proportional to , and is stationary under compactly supported variations. It approaches at infinity while the zero solution approaches .
This is nonuniqueness of Dirichlet data without control at infinity. For a global variational formulation one must specify the admissible variations: the exterior example is not critical against every finite-energy zero-boundary variation, since varying it in its own direction changes its energy to first order. Prescribing an appropriate limit at infinity, or a variational space in which the difference is an admissible zero-boundary test function and constants are excluded, can restore uniqueness.