As stated by LayerZero here:
Since the chainIds are proprietary, they are subject to change. As recommended by LayerZero on point 4 here, use admin restricted setters for changing these chainIds.
Additionally, in the current Maia contracts most chainIds have been marked immutable. If LayerZero does change the chainIds, migrating to a new version would be quite cumbersome all because of this trivial chainId problem (if not handled).
There are 2 instances of this issue: 
Note: Most bridgeAgent and Port contracts have this issue as well, but I have not mentioned them here explicitly)
https://github.com/code-423n4/2023-09-maia/blob/f5ba4de628836b2a29f9b5fff59499690008c463/src/RootBridgeAgent.sol#L40
As we can see below, currently the chainId is immutable. Consider removing immutable to ensure future chainId changes compatibility.
https://github.com/code-423n4/2023-09-maia/blob/f5ba4de628836b2a29f9b5fff59499690008c463/src/CoreRootRouter.sol#L47
As we can see below, currently the chainId is immutable, Consider removing immutable to ensure future chainId changes compatibility.
