Brexit is delaying key pieces of policy and legislation, angering ministers and officials, amid reports of paralysis across Whitehall as the government focuses on solving the current crisis, the Guardian has learned.

Legislation meant to limit the prosecution of soldiers, create an online regulator and curb drug dispensing errors has been held up or postponed as the government tries to gain enough support for a deal to leave the EU.

It comes as Whitehall departments divert senior staff to work on Brexit-related matters in case the UK leaves the EU without a deal.

Plans to introduce legislation to stop the armed services from facing legal action for alleged crimes more than 10 years old have stalled because of chaos in Downing Street over Brexit, Whitehall sources have disclosed.

Gavin Williamson, the defence secretary, was expected to bring forward the proposed legislation in this year’s Queen’s speech after the government faced pressure to address the legacy of the Troubles in Northern Ireland.

The measures being proposed included a statutory presumption against prosecution, meaning veterans would not face prosecution if the alleged offence took place more than 10 years ago.

However, sources said the proposals had been hampered because ministers were failing to engage amid the pressures of Brexit.

“The legislation was benign and had been discussed between the Ministry of Defence, the Northern Ireland Office and the attorney general’s office. But it has been delayed, with no official sign off, in part because of a lack of leadership. The problem is No 10,” the source said.

Asked to comment on the delay, a government spokesperson said it had established a dedicated team to examine all the options to increase legal protections for the armed services.

“The team is working with colleagues across government to find the best way forward and that work is ongoing,” a statement said.

A white paper on online harms that set out new laws to improve internet safety has also been delayed, insiders said.

The policy document, drawn up by the the Home Office and the Department for Digital, Culture, Media and Sport, was supposed to be published last week and was expected to impose huge fines on tech platforms and their executives.

Whitehall sources said the government had been holding it back for several reasons including difficulties finding “appropriate legal advice” due to Brexit. The white paper has been criticised by the Society of Editors for introducing “press regulation by the back door”.

A government spokesperson said the white paper would be published shortly and would set out the responsibilities of online platforms, how these responsibilities should be met and what would happen if they were not.

Steve Brine, who resigned as health minister last week to vote against Theresa May’s Brexit deal, earlier wrote that a focus on Brexit legislation meant parliament had been unable to consider new legislation on pharmaceutical dispensing errors.

In a letter to the MP Kevin Barron, he said parliamentary time and government legal departments were focused on legislation relating to the UK’s departure from the EU, and consequently proposed amendments to the draft legislation had not been considered “as quickly as hoped”.

It emerged on Saturday that two-thirds of staff employed directly by the Department for Environment, Food and Rural Affairs (Defra) are working on delivering Brexit, according to official government figures.

As the possibility of a no-deal Brexit has increased, civil servants have spent more time and public money on possible scenarios that may never be needed, with £4bn of taxpayers’ money earmarked for no-deal planning since 2016.

Agencies and departments are meant to be reprioritising work or stopping tasks to accommodate this change – but for the most part ministers are not being clear about which policies they are happy to drop.

Sources told the Guardian the Department for Education and the Ministry of Justice had put some policies on hold but not officially announced which ones.