The only way I can see this possibly working would be:
Notify the player of what will happen so they don't panic when their team is missing.
Take the player's party away.
Create a new party by giving them the first Pokemon in their PC or making them choose.
Disable trading while inside.
Deposit all Pokemon they're holding.
Return the original party.
This prevents the Secret Base from being used as a healing spot, but comes with its own problems - most notably that it makes little sense and is overly complex. The player would also need to have at least one Pokemon in their PC for it to work, which won't always be the case if they only caught what they intended to use in the story.
If mods are really concerned about shiny hunters exploiting the PC for healing, then I think the solution is rather simple. They should remove the healing function of portable PCs completely, since the original idea is so that teams can have tournaments in secret bases(tournament mode), having the healing option would be unnecessary anyways.