Can the branch company sign the contract when it wins the bid?

You can't. It is obviously illegal for the head office to sign the contract after the branch company wins the bid. In general, whoever wins the bid will sign the contract. If the company participates in the bidding and wins the bid, it proves that the qualification of the branch meets the bidding requirements, so the branch should sign a contract.

legal ground

Article 48 of the Bidding Law

The winning bidder shall fulfill its obligations in accordance with the contract and complete the winning project. The winning bidder shall not transfer the winning project to others, nor shall it dismember the winning project and transfer it to others separately. The winning bidder may, according to the contract or with the consent of the tenderer, subcontract part of the non-major and non-critical work of the winning project to others for completion. The person who accepts subcontracting shall have corresponding qualifications and shall not subcontract again. The winning bidder shall be responsible to the tenderer for the subcontracted project, and the subcontractor shall be jointly and severally liable for the subcontracted project. Entrusting a branch company to sign a contract after winning the bid conforms to the stipulation that "the winning bidder shall fulfill its obligations in accordance with the contract and complete the winning project". After the power of attorney and other related procedures are completed, the head office will entrust the branch to sign the contract after winning the bid.