Retry check doesn't work as expected

Icinga conf:

.
.
.
template Service "my_passive_service" {
    import "base_template"

    check_command = "passive"
    max_check_attempts = "5"
    check_interval = 90s
    retry_interval = 90s
    check_timeout = 10s
    command_endpoint = host.name
}
apply Service "my_service" {
  import "my_passive_service"

  assign where regex("*xxx*", host.name)
}


.
.
.

Icinga web behavior seems a little bit strange, since switching from one to another state level can overlap as shown in figure:

It looks like a bug in icinga2. Why is that happend and how to fix it?

Additional information about our icinga2 installation:

icinga2 --version
icinga2 - The Icinga 2 network monitoring daemon (version: r2.10.5-1)

Copyright (c) 2012-2021 Icinga GmbH (https://icinga.com/)
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl2.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

System information:
  Platform: Debian GNU/Linux
  Platform version: 9 (stretch)
  Kernel: Linux
  Kernel version: 4.19.0-0.bpo.1-amd64
  Architecture: x86_64

Build information:
  Compiler: GNU 6.3.0
  Build host: cb654124b660

Application information:

General paths:
  Config directory: /etc/icinga2
  Data directory: /var/lib/icinga2
  Log directory: /var/log/icinga2
  Cache directory: /var/cache/icinga2
  Spool directory: /var/spool/icinga2
  Run directory: /run/icinga2

Old paths (deprecated):
  Installation root: /usr
  Sysconf directory: /etc
  Run directory (base): /run
  Local state directory: /var

Internal paths:
  Package data directory: /usr/share/icinga2
  State path: /var/lib/icinga2/icinga2.state
  Modified attributes path: /var/lib/icinga2/modified-attributes.conf
  Objects path: /var/cache/icinga2/icinga2.debug
  Vars path: /var/cache/icinga2/icinga2.vars
  PID path: /run/icinga2/icinga2.pid