We have been advised by our vet not to have our pup castrated, for the moment, due to fear related behavioural issues. He is 7 months old, had a very bad start in life, is highly fearful of other dogs and needs more time to become fully socialised.
Having had another large-breed, fear-aggressive rescue many years ago, for whom, at the time, the veterinary advice was to neuter prior to 6 months and who ended up massively worse after the removal of testosterone, I am in full agreement with her.
It is well known and accepted by vets these days that dogs with fear - rather than other forms of behavioural aggression - are frequently made a lot worse by the removal of testosterone from their systems. The fine balance of hormones helps calm them to the extent that they feel the fear, without resorting to aggression to deal with it. Remove the testosterone and you are effectively removing their internal resources to calm themselves and cope without resorting to aggression.
The rescue my boy came from insists on neutering before 6 months, prospective owners have to sign a contract to agree to it or risk having the dog taken back, but in his case they are absolutely in agreement with my vet and have delayed his neuter-by date as a result. They see first hand every single day the results of unplanned, unwanted litters but trust my experience and handling of my dog enough to agree that he shouldn't be neutered - yet.
Incidentially, they also see first hand the result of dogs who suffer from severe fear-aggression - how they end up being locked away indefinitely or worse, discarded, often ending up being pts, as they can't be safely rehomed - and they agree that if we can avoid that by delaying neutering while we work on socialisation and training, then that is definitely the way forward for my particular dog.
My boy is also a large-breed, who still has open growth plates and this is another thing the rescue were willing to consider when deciding whether or not to agree to us delaying neutering.
No situation is black and white, each owner and vet have to weigh up the pros and cons for each individual dog and make their decision based on that. Bashing other owners for informed decisions made after taking professional advice is totally uncalled for.
I am quite sure that we are all dog-lovers here and every single one of us not only wants the best for our own dogs but also for the greater good. Sometimes there has to be some compromise involved. I am quite sure that if one of us who has either delayed or foregone neutering due to fear aggression posted on here to say their dog had bitten through fear, we would also get a bashing for that - sometimes you just can't win.
OP
I would definitely ask about trying chemical castration, as it's temporary, but may give you some idea about whether or not the marking will stop after castration. I suspect not, as the behaviour is very likely to be behavioural by this age, but it may be worth a try to help you with your decision.
If the marking is behavioural Lilcamper's advice on making sure he is empty before you taking somewhere is right. Take him for a long walk where he has lots of opportunities to eliminate just before you take him visiting and also try to keep him occupied and focussed while you are there, rewarding him for good attention. You can work on some attention exercises at home, so that you know you can interrupt and refocus his attention very quickly if he looks like he is sniffing and likely to mark. The more you practice interrupting and rewarding him for his attention the better. Try looking up Kikopup's training videos on YouTube to help you work out how to do this.
I do wonder if you are now tense, expecting him to mark and this might be contributing to the behaviour. If you can retrain him to focus on you and you know you can interrupt or keep his attention, you will feel more relaxed and this may have an knock-on effect.
Is he generally an anxious sort of dog? Just wondering if something like a DAP collar or some rescue remedy might also help to relax him. A fabric travel crate might also be something to think about as well, as he may feel less of a need to mark if he has his own safe-space wherever he goes.
Incidentally, my first ever dog used to do this and she was an adult, spayed GSD bitch. She seemed to be more likely to mark in houses that had other pets, but also liked to leave her mark on super-clean houses that smelled strongly of cleaning products.
She was a rescue and gradually stopped doing it as she became more and more secure with us.