I guess I’m having trouble following what is being asked.
The op asks how to cover one object with another and the latest solution looks to be tracing the image of the red object to create a tilemap for collisions.
Visually all that would change by covering one object by the other would be color. I’d think a different colored animation frame, or a color effect, or even a blend mode would work fine.
If you do actually want that area replicated with blue rectangles, and that area is already made up of rectangles. Then you could also create a blue sprite for each red one and set the size and position to be the same.
Any of those would be cheap instead of looping over the pixels to create a tilemap.
In short I guess I’d want more details of what you want to do. You have a simple example, how about a deluxe one too. It would prolly better show what you want.