A major road linking North Yorkshire and Cumbria has been closed due to high winds.