Adding core Javascript libraries in my_module.libraries.yml
I just scraped the MY_MODULE.libraries.yml and utilized one of the other methods of adding assets, by:

function MY_MODULE_page_attachments(array &amp;$attachments) {
  $attachments['#attached']['library'][] = "core/jquery.ui.accordion";
  //new addition below
  $attachments['#attached']['library'][] = "MY_MODULE/MY_MODULE.accordion";
}


This works for me. Perhaps you don't need a MY_MODULE.libraries.yml if you are trying to add libraries that already exist in core.

Edit: So I still have a MY_MODULE.libraries.yml file however it now just adds my module's javascript (with a dependency to jQuery). It's just some Javascript that initializes jQuery UI accordions. I still use the code above to add jQuery
s UI accordion javascript and my own.