On the Role of Discount Factor in Offline Reinforcement Learning