Thanks @stephenb. I managed to assign the APM integration to the Fleet Server Policy.
But the next problem arises: The agent cannot connect to elasticsearch because it does not use the right url -> Failed to connect to backoff(elasticsearch(http://localhost:9200))