When we apply voltage across the diode, as shown below:
When the voltage applied across the diode is greater than the barrier voltage, the electrons and the holes present in the n-type and the p-type regions of the diode acquire enough energy to cross the barrier at the junction.
Now if we talk in terms of forces acting on the charge carriers, then there are 3 kinds of forces acting on both types of carrier as shown:
FE1 is force acting on electrons (in p-type) due to electric field.
FE2 is force acting on holes (in n-type) due to electric field.
FA1 is force acting on electrons (in p-type) due to hole-electron attraction.
FA2 is force acting on holes (in n-type) due to hole-electron attraction.
FV1 is force acting on electrons (in p-type) due to external voltage source.
FV2 is force acting on holes (in n-type) due to external voltage source.
The forces satisfy FE1 + FV1 > FA1 & FE2 + FV2 > FA2 and hence holes & electrons are able to cross the barrier and hence flow of charge carriers continue.
The flow of charges doesn’t stop as long external battery is connected because battery itself generates electrons and holes.