This scenario looks intermittent.
Live cluster where issue occured: http://172.27.69.192:8080/#/main/admin/stack/versions
Issue 1 : After performing downgrade, it started to show 'out of sync' for all previously upgraded stack including base stack. Attaching the screenshot.
Issue 2 : Its allowing to install previously installed stack including base.
Test steps performed :
1) Performed ambari upgrade from 220.127.116.11 to 18.104.22.168-185
2) Performed the patch upgrade in batch of 3.
3) Performed the downgrade before finalizing the 3rd upgrade.
4) After performing downgrade, UI is showing out of sync for previously installed stacks and allowing them to reinstall.