How to make an air dash travel the same distance as a ground distance?

I’m trying to implement dashing and the biggest issue I’m facing is that an air dash goes much further compared to a grounded dash.

I’ve tried messing around with linear velocity to apply a force in the opposite direction as well as trying to make my own air resistance to try and slow them down, but nothing has worked/been accurate.

local root = model.model.HumanoidRootPart
local speed = 25
local dashSpeed = 200
local rotationSpeed = 1

-- Dashing (temporary code for testing)
for _, inputObject, gp in Matter.useEvent(UIS, "InputBegan") do 
	if inputObject.KeyCode == Enum.KeyCode.Z then
		root.Velocity = root.CFrame.LookVector * dashSpeed
	end
end

local moveDirection = Vector3.new(horizontal,0,vertical)

-- Movement and Rotation
if moveDirection.Magnitude > 0.5 then 
	root.CFrame += moveDirection.Unit * speed * Matter.useDeltaTime()
	local goal = CFrame.new(root.CFrame.Position, root.CFrame.Position + moveDirection.Unit)
	root.CFrame = root.CFrame:Lerp(goal, rotationSpeed)
end

Perhaps it’s ground friction. Perhaps make the character move up by like 0.01 studs so they don’t experience the friction.
If above ground dashing goes farther, it’s probably because of the momentum gained from dashing so you would probably try adding a bodyvelocity and making the velocity 0,0,0 to stop the momentum.