Unrelated to the post, but you mentioned glue alongside nails. How did you use it? or do you mean just that one sandbox version of it that I cant figure out.
have it in your inventory and while grabbing (not holding) something next to a wall, press middle mouse button. its really janky and it has to be still for a second or two before you can actually glue it
That isn't glue, that is just an individual feature that does not require it. It's just meant to help with nailing objects down/together that are off the ground by holding the object in place without player input, so it isn't meant to stay between reloads.