How should a custom configuration entity define a dependency on other configuration?
ConfigEntityInterface::calculateDependencies returns $this, so this line:
$this-&gt;dependencies = parent::calculateDependencies();

Is causing problems (replacing the dependencies array with the instance of the current class, which is presumably a MyAccessDefaults).
Looking at the code, and other core classes which implement ConfigEntityInterface, your code should be:
public function calculateDependencies() {
  parent::calculateDependencies();
  $this-&gt;addDependency('module', 'user');
  if (isset($this-&gt;role_id)) {
    $this-&gt;addDependency('config', &quot;user.role.{$this-&gt;role_id}&quot;);
  }
  return $this;
}