The barren plateau phenomenon is one of the main obstacles to implementing variational quantum algorithms in the current generation of quantum processors. Here, we introduce a method capable of avoiding the barren plateau phenomenon in the variational determination of the geometric measure of entanglement for a large number of qubits. The method is based on measuring compatible two-qubit local functions whose optimization allows for achieving a well-suited initial condition, from which a global function can be further optimized without encountering a barren plateau. We analytically demonstrate that the local functions can be efficiently estimated and optimized. Numerical simulations up to 18-qubit GHZ and W states demonstrate that the method converges to the exact value. In particular, the method allows for escaping from barren plateaus induced by hardware noise or global functions defined on high-dimensional systems. Numerical simulations with noise are in agreement with experiments carried out on IBM's quantum processors for 7 qubits.