I have an Ohlins the right way up and it gets very close the battery. It touches unless I push the battery and box forward till it hits the air filter
There were two sizes if battery for the G/S, one which is around 5mm larger in each dimension than the other.
Most current batteries are the smaller size, mine is and I think if it was the larger size there would be real clearance problems with the shock the right way up.
On my bike, of course, there may be other bikes where there is no problem, BMW frame building was not as precise an operation as some would have you believe!