MCFunction minigame: Paper lags but vanilla doesn't

I have a minigame map with custom mcfunctions. When I start it with Vanilla server core, everything is ok. But if I start my game with Paper server core, the server lags (TPS). This is the same in either 1.14.4 or 1.15.2 minecraft versions.
What is the problem and how to solve it?