Yes, as long as you have a forward facing thru hull and there is no air entering the thru hull.
In most cases you can make water while underway as long as you have a forward facing scoop on your thru hull. The forward facing scoop will take your boat’s forward motion and “push” water up through the watermaker intake and into the system, allowing you to fill your tanks as you cruise along. Planing boats, high speed racing monohulls and multihulls should all use caution when operating their systems underway. The high velocity of the water rushing past the hull can create a vacuum and cause accelerated wear on the pumps. Check with your local installer if you have concerns about your application.