Having issue with code block <p><code>

I am new to prose mirror, i have added promise mirror editor to my website. when user type a code in editor its generating paragraph tag instead of pre tag (see the screen shot below)

So when user preview the editor content it looks like Screenshot 2024-03-05 at 12.37.37 PM

other screen shots for reference

You provide terribly little information here about what you are actually doing, but one possible thing that might be happening is that your parse rule for paragraph nodes is matching these elements and has a higher precedence than your rule for code blocks.