In GameMaker:Studio game engine there is a thing which is called "Surfaces"
First you create that surface by giving width and height in pixels
then you can draw on it everything you want. You can draw sprites, draw primitives, draw pixels, lines, squares etc.
Surfaces are not clearing by itself it's like painting on a raster image in 2D graphics program, when you draw something it will stay until you draw something on top of it
And this process is invisible (it happens in the memory) until you use function draw_surface() to show that surface.
You can convert that surface to a new sprite, or texture or just draw it on screen
How i can achieve this in GoDot?