Its sounds like you have used logged into the system who are updating data while mrp is running. Its best practice to not run mrp while users are logged in.
One option is to change the concurrency on the req trans table but I would prefer to not have other users so that is then not necessary.
The more work your mrp has to do the longer a record may need to be locked. So how many items, how many periods ahead. how many bom levels etc all influence record locks.
Similarly undersized infrastructure.not using dedicated batch server, or helpers, or poor sql maintenance increases the process time and the risk of a deadlock.
At R2 and prior versions as Ludwig mentions there was a hotfix issue - however the hotfix also had issues.
see for example https://axcalated.blogspot.com/2015/03/firming-planned-order-returns-error.html and https://community.dynamics.com/ax/f/33/t/38993