Yes we should. Like in 1971 when we didn't make Pak bite dust completely we allowed them to become such a big headache as it is now. Bangladesh will become the same.
If we take recent times and talk.
It is tougher with Pakistan to intervene both because stronger military and nukes. Plus border is very well protected in comparison. Importantly, relatively fewer Hindus.
However, things are different with Bangladesh.
Border is porous, we will have insane refugee problems.
No nukes, manageable military.
And unlike Pakistan there is a massive population of Hindus here and they will be massacred. If we don't, nobody will help them. Besides if Bangladesh turns islamic, Pakistan will transfer nuke technology and we will have another big headache. This has to be nipped in the bud.