https://stackoverflow.com/questions/36497580/inno-setup-ask-for-reboot-after-uninstall
Use UninstallNeedRestart event function:
function UninstallNeedRestart(): Boolean; begin Result := True; end;
It makes uninstaller ask for reboot at the end.

Note that you cannot combine this with the AlwaysRestart directive.