Sam didn't stay within the formation. He went back to the residence he was given and placed all kinds of concealment formations. He didn't even let Agar in. After making sure that no one is looking at him, he entered the divine dimension.
He directly went to the second floor and closed his eyes before creating a simulated version of the whole body of the Five-Elemental King.
He simulated the whole body except for the skin, and then the simulation of the energy flow, but the model collapsed as he didn't simulate the formation.
It would take a lot of time for him to do that, so simulated the functions of the formation. Absorbing the energy that was coming out of the body and injecting the energy into the body.
As he did that, the model finally stayed still.