Might try chasing the threads with the same size tap to clean up the threads. A plug tap to start, followed by a bottoming tap if the plug tap bottoms out before cleaning up the threads. Followed by some blue Loctite if the screw even holds a little. Or if possible, drill and tap to next larger size. No way I'd replace the valve cover without trying a few fixes. I replaced mine and it was a bit of a PITA. Tight clearance under wire loom being careful not to dislodge gasket from hitting cam sprocket when installing.
Requires application of sealant at certain locations. I followed instructions ( or so I thought and used proper Mazda gray sealant) and still had a leak. If done again I'd add extra sealant to the indicated areas at the front adjacent to the cam sprocket area. And I got the sealant at the dealer so I could verify the sealant hadn't expired. The expiration date is stamped into the bottom crimp of the tube. I called them first to check availability and verify expiration date. Didn't want expired sealant that was already hardening in the tube or would never set up/ harden due to curing agent deterioration. Always good practice to check sealant expiration dates when purchasing.
On another note I also check date codes when purchasing caulking for home use.