Scope creep is inevitable in high-stakes projects, especially when working with government or large enterprises where requirements evolve mid-flight. One moment you're building a system, and the next you're asked to add three more 'must-have' features that weren't in the blueprint. There are two techniques by which it can be mainly mitigated, one being operational and the second being financial.
The operational approach is preparation. Preparation is a multi-step process, with the first step being giving the most detailed proposals before you even sign a contract, outlining most risks and assumptions. Then at the beginning of the project, clearly demonstrate risks, even as small as employee attrition, to your client. Once that is done, you should clearly build detailed FSDs (Functional Specification Documents) with sections on handling change management as well and get them signed. This is your airtight document that prevents the "I said this during February but it's not here" moments. And even after this, when these scope creep moments do occur, you can simply go back to the change management process and bill/settle accordingly.
The second approach is purely financial and straightforward. Rather than quoting projects with fixed bids or lump sum costs, it's best to do them on a time and material basis. What this means is that from the beginning of the project, you agree to what resources will be committed to the projects and for what engagement periods. This way, you can provide a transparent pricing structure to the customer as well. You may also want to make sure that it is contractually provided that your services will be based on a best-effort basis rather than a fixed timeline basis. This will give you ample room and flexibility to plug and play resources and prolong or cut short project timelines. To protect minimum billables, a prudent agency might even negotiate a minimum engagement period (MEP) to ensure a certain billable breakeven is met.
However, with every technique comes its pros and cons, and it ultimately depends on the unique circumstances of the project, the client's appetite, and the agency's ability to negotiate and confidently discuss risks and rewards upfront.