It is likely that you have debris or some oil on the contacts of the keyboard unit.
Use some rubbing alcohol or lens cleaner cloth on those contacts, then firmly attach your clipboard.
Let us know if the problem is resolved.
Things to avoid when handling PCs:
- Hand sanitizers (usually has a moisturizer to counter-act alcohol)
- Skin or hand moisturizer
- Sunscreen
- Food (especially snacks or fried