I finally found the problem, the blitter functions of graphics.library are sooo slow. I have changed these functions to use the blitter directly, and it works perfectly on Amiga 500. But I couldn't find a way to optimize it further and configure the graphics to be interleaved using the graphics.library in KS 1.3, so now I am working directly with the hardware using C.
In case someone finds useful the code I has developed using the graphics.library, the following code works on Amiga 500 with KS 1.3
https://github.com/balrogsoft/amiga500-game-engine