You can tap any of the following tools: Pen, Eraser, Highlighter, Shapes, Lasso, and then "Disconnect Apple Pencil."
Alternatively, from the library view, tap the Gear icon at the top-right corner > Settings > Stylus & Palm Rejection > Smart Stylus > None.