Mark duplicated menu items active

For a Drupal 8 project, my menu contains duplicated items to the same path to simulate subsites with a single menu.

The default behavior seems to mark only the first menu item active.

To mark all active according to the current path, try Menu trail by path.