This error may occur if the file path or name is incorrect or if the file does not exist in the specified location. You can try to check the spelling of the file name and path, or create a new file with the correct name and content.
Alternatively, you can use the Get-AzRoleDefinition command to generate a baseline role definition object, modify its properties as required, and then use the New-AzRoleDefinition command to create a custom role using the role definition object.
https://learn.microsoft.com/en-us/azure/role-based-access-control/custom-roles-powershell
If you are still seeing issues after following the steps shared above, please let me know in the "comments". I will then investigate further and determine the next steps for you.
If this helps, please 'Accept answer' so that it can help others in the community looking for help on the same topic.