I fixed the problem adding the version of the plugin in the pom.xml, which is the same of spring boot’s version. (and it’s working since spring boot 2.2 until 2.7.X)
So you just have to configure your pom like this:
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${project.parent.version}</version>
</plugin>