In short, your assumptions are contradictory: the option cannot be worth something and hence require a hedge position if you can go from 0 to maturity in a straight line at the implied vol that was used to price it. Either because “a straight line” is not a feature of the model, or because if it is, it implies a zero option value.
That the stock should move in one direction only is in direct contradiction with its assumed dynamics under any reasonable continuous-time model (eg Black-Scholes) where “volatility” is a measure of how much amplitude the continuous up and down moves of the stock have. A Brownian motion is continuous and non-differentiable at any point, and hence simply cannot move up in a straight line: it is always “jagged”.
Even in a binomial model settings, if you can only attain the strike by going up at each step, then your (call) option is worth 0 at inception (because it is struck at the highest point in the tree). If you must go down at least once to exactly reach the strike, then your option is worth something and you will make money on your hedge at some point by having sold high and bought lower (since you’re long gamma).
The consequence is that if the construct is internally consistent (as in the binomial example), your option will be worth 0 and the appropriate hedge will be to do nothing with the underlying. You will then not lose money when the straight-line scenario occurs.
Note: this is not to say that it can’t happen in reality, it can and does, and the hedger typically loses money in this scenario.