Despite the flat bars, your current bike is more like a gravel bike than a mountain bike in terms of capability. The gravel bike will be faster, but it will not be more capable of handling different terrain (aside from tire clearance options on some bikes perhaps). As folks said, you can improve your bikes capability with different tires.
I'm a huge fan of mountain bikes with air sprung forks and disc brakes and modern geometry. They are super capable, go anywhere machines.