Painting cookies with egg-yolk

Painting the unbaked cookies with egg yolk, why sometimes the egg yolk coating after finish baking will peel-off or come-off the cookies. Can someone please advise how to make the painting the egg-york coating on the cookies stay permanent?

Early in the day or the day before: In a large bowl cream the shortening and the sugar. Add the eggs, extract, and milk. In a medium bowl mix the dry ingredients with a wire whisk. Add the dry ingredients to the large bowl. Mix with mixer until well combined. With hands, shape dough into a ball. Wrap with plastic wrap and refrigerate for 2 to 3 hours.

Sorry I don’t get what you are saying.
I am using fresh egg yolk for painting the cookies.
First, I separate the egg yolk from the egg white and then I combine the egg yolk with water and mix well and use it for painting cookies before I put them in the oven for baking.
The problem is why sometimes the egg-yolk coating peel-off or would not stick on the cookies?
What you are describing, is it making dry egg-yolk for painting or what?
Please advise and explain further.

Wrap with plastic wrap and refrigerate for 2 to 3 hours.