You can get casters with locking brakes. My sewing machine table has them on it. They lock pretty good but my table does "travel" a bit at times. I don't think it has the best brakes but they sure do help.
https://www.casterdepot.com/accessories/brakes