What you actually need is pragmatism and not dogma.
I have a hard deadline external to the company by which time the project, and it is a project, needs to be done of else the company can't sign up new customers.
It would be pretty irresponsible of me to only focus on the next two weeks until it was done as I'd have no way of really knowing how close or far it is to completion, how we're tracking and if we need to make adjustments.
We did a rough plan. We worked to it. We evaluated how we were tracking and we shifted things in sprints around accordingly.
The benefit of agile is introducing short feedback loops that provide information you should be acting on.
Good project management also provides benefits.
Take the benefits from both, or leave one set of benefits on the table.