While this surely isn't the best way to do this, a simple solution would be to change your velocity before your move and slide function like this:
if Input.is_action_just_pressed("dash"):
var mouse_direction = get_local_mouse_position().normalized()
velocity = Vector2(DASH_SPEED * mouse_direction.x, DASH_SPEED * mouse_direction.y)
you can fiddle around with dash speed so the player dashes within your designated time range and speed.