Why is my keyboard magnet rattling?

Hey, my Lenovo Duet Chromebook is having an issue where there is a rattling of what I assume is the attachment magnet on the right side of the keyboard connector. When I apply a bit of pressure, it stays in place better and doesn’t make much noise. How do I go about fixing this?

crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 0
crwdns2934285:0crwdne2934285:0