
This is another reason to avoid castration early. It will make him less confident and willing to eliminate away from home. Owners of young bitches have this problem quite often, in that the bitch will not go away from her usual place at home. Marking and toileting away from home are marks of a socially confident dog, and lower ranking ones will not wih to advertise their presence by going awy from the safety of home.
As you have taught him to go on the balcony in the first place, it will be very difficult to stop him, and unkind to chastise him, for going in the place he was taught to go.
As he gains confidence and approaches sexual maturity he will be keener to go away from home.