The function "Draw material for rendering target" is not working correctly.

I have attached all the information, all the code and the principle of its operation, but I can explain the expected effect in more detail.

I need some program (modifier) ​​that will cut or apply a new material to the area of ​​the object that is inside some cylindrical figure. Moreover, this figure is a changeable skeletal mesh without animations, but its bones have a dynamic size depending on the player’s preferences. After some event (let it be an interface button for now, something like “Confirm changes”), I need to save the place where my modifier was applied as a texture, so that I can later use it as different masks in the material graph. This should be a very complex program that should take into account the UV mesh of the object and draw a texture on top of it.
Therefore, I want to know how to draw a texture taking into account the UV mesh when using such a modifier.

I can change my approach if you tell me what tools are available for this. For example, I’m currently trying to do this via “StensilBuffer”, but I’m not too happy with the result, and it also imposes restrictions on the type of material used and still doesn’t allow saving the result of the modifier’s work to a separate file, so I’d be glad for any help from your side!