The reason he holds it while in the crate is because dogs don't like to soil where they sleep but once free it is just as natural to him to pee in the house as it is outside. He doesn't understand the difference and what you want from him yet.
The more times you successfully get him to go outside and let him know he is doing the right thing and the less he goes in the house the quicker he will catch on. When you can't keep on eye on him, confine him.
It is a lot of work sometimes but I'm sure he makes up for it in many other ways.