You can keep a curve into a plane, either at creation or edition.
Click Modification .
Click the curve.
The Planarity icon is activated to let you impose the curve to remain in its plane.