No more SFTP access if SSH bash/jailbash enabled

Hello, I have a small issue with SFTP access:

When the user’s SSH access is set to “nologin,” there are no problems, and the user can connect correctly to their directories via SFTP. However, as soon as I grant them SSH access (bash or jailbash), everything works fine on the SSH side, but it’s impossible to connect via SFTP.

Can you tell me what I’m doing wrong?

Thank you in advance.

I’m answering myself in case it helps someone:

Actually, on my Debian 12, I had this line in the /etc/ssh/sshd_config file:

Subsystem sftp internal-sftp-server

To make both BASH and SFTP access work correctly, you need to manually edit sshd_config and change it to:

Subsystem sftp internal-sftp

Then restart SSH with:
sudo systemctl restart ssh

I was in a rush installing a new server, everything okay but suddenly out of nowhere during import of users from older server to newer server thats when sftp stopped working. I thought firewall or ip blocked but wasn’t it. In the end i just decided to override 90% of the sshd config file with a working server. That fixed it, but i guess yours points out the exact issue and thank you for that! i was going crazy