What prevents lead attached to a piece of semiconductor (for example in BJTs and FETs) from forming a Shottky junction?
There is usually an intermediary material between the semiconductor and the lead wires that does not form a Schottky barrier.
Either the metal-side material is chosen so that the resultant potential energy barrier at the junction is low enough that it doesn't significantly impede the flow of charge carriers or the semiconductor near the junction is so highly doped that the barrier is thin enough that charge carriers can tunnel through it.
In VLSI design we have billions of contacts from metal to silicon, and to my knowledge this does not typically require any additional layers or materials to prevent the formation of a Schottky barrier. However, these contacts are always made directly to a heavily doped n or p region such as the source/drain regions of a transistor and the resulting "junction" is effectively ohmic.