As mentioned in the comments, Collectors.toMap should be used here with the merge function (and optionally a map supplier, e.g. LinkedHashMap::new to keep insertion order):
Stream.of(dev1, dev2, dev3, dev4)
    .collect(Collectors.toMap(
        Developer::getCodePost,
        dev -> dev,
        (d1, d2) -> Stream.of(d1, d2)
                          .filter(d -> d.getCodeLevel() == 5)
                          .findFirst()
                          .orElse(d1),
        LinkedHashMap::new // keep insertion order
    ))
    .values()
    .forEach(System.out::println);
The merge function may be implemented with ternary operator too:
(d1, d2) -> d1.getCodeLevel() == 5 ? d1 : d2.codeLevel() == 5 ? d2 : d1
Output:
Developer(id=3, name=Camilia Frim , codePost=30, codeLevel=5)
Developer(id=2, name=Peter Zola, codePost=20, codeLevel=4)
Developer(id=4, name=Antonio Alcant, codePost=40, codeLevel=4)
If the output needs to be sorted in another order, values() should be sorted as values().stream().sorted(DeveloperComparator) with a custom developer comparator, e.g. Comparator.comparingLong(Developer::getId) or Comparator.comparing(Developer::getName) etc.
Update
As the devs sharing the same codeLevel should NOT be filtered out, the following (a bit clumsy) solution is possible on the basis of Collectors.collectingAndThen and Collectors.groupingBy:
- input list is grouped into a map of codePostto the list of developers
- then the List<Developer>values in the map are filtered to keep the devs with maxcodeLevel
// added two more devs
Developer dev5 = new Developer (5L,"Donkey Hot",40,3);
Developer dev6 = new Developer (6L,"Miguel Servantes",40,4);
Stream.of(dev1, dev2, dev3, dev4, dev5, dev6)
      .collect(Collectors.collectingAndThen(Collectors.groupingBy(
              Developer::getCodePost
      ), map -> {
          map.values()
             .stream()
             .filter(devs -> devs.size() > 1)
             .forEach(devs -> {
                 int maxLevel = devs.stream()
                     .mapToInt(Developer::getCodeLevel)
                     .max().orElse(5);
                 devs.removeIf(x -> x.getCodeLevel() != maxLevel);
             });
          return map;
      }))
      .values()
      .stream()
      .flatMap(List::stream)
      .sorted(Comparator.comparingLong(Developer::getId))
      .forEach(System.out::println);
Output:
Developer(id=2, name=Peter Zola, codePost=20, codeLevel=4)
Developer(id=3, name=Camilia Frim , codePost=30, codeLevel=5)
Developer(id=4, name=Antonio Alcant, codePost=40, codeLevel=4)
Developer(id=6, name=Miguel Servantes, codePost=40, codeLevel=4)