To recreate:
Open a GUI with the recipe book icon (survival inventory, furnace, crafting table).
Click on the recipe book button to open or close the menu.
Hold down SPACE. As you do, the recipe book menu should start flashing open and closed and the button click sound should play repeatedly.
This is likely a bug as similar buttons, such as villager trade buttons or beacon power selection buttons, only activate once when clicked and SPACE is held down.
Linked issues
Comments

Thank you for your report!
However, we are already tracking this issue, and this report is a Duplicate of MC-118107.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – ✍️ Feedback and Suggestions – 📖 Game Wiki