add support for PEP 621: consider relevant project sections when calculating the content hash for the lock file (#9135)