There is not a strictly YES/NO answer to this question. Instead, there is an explanation to it:
From a purely Object-Oriented perspective, yes this is a leaky encapsulation. Why? Consider a case where a class has many attributes, and each attribute has a getter and a setter. Now,if this class is used in a large and complex application, in many places and in many ways, then it becomes difficult to control the state of the object (attribute values), as it can be modified/changed in many ways in many location, THROUGH ACCESSORS (getters and setters). So, what is the solution? Well, in general, better design is to construct an object through a constructor. For example, the User class can be redesigned as this:
class User {
private username;
private password;
// constructor
public User(name, password) {
this->username = name;
this->password = password;
}
// other methods
}
In this new design, there is only one way to create an object of User type, with constructor. This guarantees that the object is created in a known way, in a controlled way, hence its behaviour known at any time, is predictable.
Considering the above argument, it is not the getters that make the encapsulation leaky, it is the setters, because they are modifiers; can modify the state of the object 1) outside the constructor 2) any time, other than the time of construction.
That all being said, there are situations where one has to provide getters and setters for a class. For example, certain object-relational frameworks require this, for them to be able to modify objects.