The films are considered a trilogy, even though the actors play characters with different names in each film.
Despite the actors playing distinct characters in each film, these movies are still considered part of a trilogy.