A North Yorkshire police officer has died after she was struck by a lorry whilst helping at the scene of another crash on the side of a highway.