I did the following:
if Input.is_action_pressed("boost"):
apply_central_force(basis.y * delta * thrust)
if Input.is_action_just_pressed("boost"):
thrust_audio.play()
if Input.is_action_just_released("boost"):
thrust_audio.stop()
And as rhirne12 mentioned, add the thrust_audio.stop() to crash_sequence() and complete_level().
My rationale for this is by using the if/then statements, you’re actively setting variables every frame. By using the other input methods, you’re only doing something when necessary. While it doesn’t make a bit of difference for a tiny game like this, it can make a huge difference in something far more complex. I think it would be a good idea to teach best practices from the start, even if it makes a lesson longer by saying, “you could do it this way, but here’s why you may want to do it this other way instead.”