You will need to install a diesel-compatible ball valve on the inlet to your primary fuel filter. Not aware of any OE installations that came with one.
You are correct, if level of fuel in tank is above that of the fuel filter, fuel WILL run out.
But, that actually, is better than the alternative-- if level of fuel in tank is lower, fuel will drain back to the tank, leaving you with 30+ feet of AIR in the fuel line that will need to be purged!
Until you install the ball valve, just have a bucket under the filter, new filter with O rings on it ready to go and all tools at hand. Be sure to remove old O rings.
Ex: 2003 Alpine 38FDDS. Ex: 1997 Safari Sahara. Ex: 1993 Foretravel U240