Hi @nitin-cfg,
In addition to the great comments from @melodyc_lam and @dbrace, I thought it might be good to quickly discuss deletions overall in Canvas. In my 12 years of experience as a Canvas admin, I basically have the expectation that as of right now, almost nothing is ever permanently removed/deleted from Canvas. As you're discovering, most delete actions are really more of a "soft-delete" where the items don't show up in the UI (or API) anymore, but they do still exist in the database and will prevent you from reusing some of their ID info (as that's what can sometimes be utilized to restore items in the future if needed, especially through SIS processes). If I ever do need to delete a course or user from production Canvas, I take similar action as @dbrace and remove (or alter) the sis_id first to avoid future issues.
For your situation where is sounds like you're doing some development work, I'd recommend using your beta/test Canvas environments if possible. I make that recommendation just so you don't have a lot of deleted things in production that will basically never fully go away. I know it's not always feasible to do all development work in beta/test, but when possible I'd highly encourage it.
Hope this helps!
-Chris