User Role creation in module overridden by configuration import
Docs for installing default configuration in a custom module
However, putting a role in the configuration of a module is probably a bad idea.  I can't think of an example of a major contrib module that does this.
Imagine this situation: you install the module, and then the role gets enabled.  Next, the user adds some other permissions to the role (created by the module) unrelated to your module.  Then the user uninstalls the module.  Now what should happen?  Usually, the expectation is that module config will be cleaned up on uninstall, but this won't happen for roles.
What you probably want to do is add some permissions and allow the user of the module to add those to the role of the user's choice.