so, I converted the code to DrawPixel, it worked perfectly.
I noticed that he uses the sprite component to make the drawing.
so I will try to generate component sprites at runtime and draw the specific region in that sprite.
The idea is to have several sprites generated dynamically separating the regions.