If you logged into the scammers' Apple Account, and the scammers put the phone into Lost Mode, the phone is probably lost to you.
Apple's Activation Lock support page says that the phone must not be in Lost Mode. So even assuming that you had an original purchase receipt that was satisfactory to Apple, they might refuse to unlock a phone in Lost Mode.
How to remove Activation Lock - Apple Support
Request additional support for unlocking your device – Important things to know before you continue
Paying the scammers would be a bad idea because you would be rewarding criminals, and because you can never trust extortionists. They might take your money, then demand more, and then still leave you with a "brick."
Unfortunately, it sounds like this is going to be an expensive lesson on why you should NEVER log into the Apple Accounts of strangers, no matter what story they tell to try to convince you to do it.