Interesting. Mine does the opposite. My flaccid penis will get longer as I pee.
Human as animal - my lengthening made sense to me.
I recall once watching a Clydesdale horse pee. His dick dropped from nothing to a hose that reached to his mid calf & a great stream of piss came gushing out. The flow stopped & his cock retreated to the point of vanished. While I was at the time amazed at the length of his fire hose - reflecting on the memory years later it just makes sense that the horse is designed to get his pee as close to the ground as can be to not cover his legs in piss.
You seem to be doing the opposite of the horse & I. I am positive there is a good reason - humans auto-functions all have good reason. I look forward to more thoughts on it.