Now I have a feature where user can create new data and save it , if the data is existing a modal will pop up like

Now after the user clicks the save button it will be submitted and while the request is still pending or loading there is a tendency that the user will click again on the button and the "Data already exists wanna proceed on saving?" will pop up again which I dont want to.
So as you can see on the screenshot below, the request is still pending and loading so if user clicks that again that pop up will again show . How do we solve that using angular ? Any good idea that might help ? Thanks.
#Save data snippet
listenToSaveEvent(): void {
this.saveSubject
.asObservable()
.pipe(
filter((v) => !!v),
debounceTime(1e3)
)
.subscribe(() => {
if (this.respondents.length === 1) {
return this.checkExistingData();
#CODE THAT CHECKS EXISTING DATA
checkExistingData(): void {
const test = this.formService.checkExisting(this.form)
.subscribe(res => {
if (res ) {
const createExistingSub = this.confirmDialogService.open(
ERROR_MESSAGES."Data already exists wanna proceed on saving?"
)
.componentInstance
.confirmed
.subscribe((confirmed) => {
if (confirmed) {
return this.createDATA();
}
createExistingSub.unsubscribe();
});
} else {
return this.createDATA();
}
});
