LG G5 - Home button only 'kind of' works if I hold it in??

I have an LG G5, only a couple of weeks old and I'm having trouble with the home button on the back.

The fingerprint scanner stopped working, then came back after a factory restore.

I also started having problems with a sometimes unresponsive home/lock button. When locked, it responds straight away with the fingerprint sense to unlock.

However when I go to lock the screen, the button works inconsistently. Mostly, I have to hold the button in quite hard for 3-4 seconds to get it to lock.

Already tried to have it repaired under warranty but they refused due to a scratch/tiny hairline crack on the screen. This happened on the first day and the phone continued to work for 2 weeks before these proble,s started.

When you say it respond instantly upon waking, do you have to press the home button before scanning your fingerprint? If it respond like that upon waking then it's not a hardware issue. There's an app that is not wanting to allow your device to sleep or the screen to sleep. You holding it hard for an extended time is likely doing something else and you'd also likely find that the length of time is the same whether pressed hard or normally. By pressing it hard you may actually be doing damage so try some long normal presses and verify that it will operate that way. If you were having to press it hard to both wake and put the device to sleep then I would agree with tall guy, but it's not going to work normally then not back and forth. Buttons don't fall that way.
Meanwhile once you've established that it works even under normal pressure it's time to find the app responsible for keeping your device awake.

I'm assuming that after the factory reset you allowed the device to install all of your previous apps no questions asked, is that correct? This makes finding the culprit a little more difficult and will likely mean more effort by you but it can be done.
First power off the device and then power it back on. This will shutdown all running apps and the power on will only start apps that have permission to start on startup. Try the button. Does it work to put the device to sleep as you would expect? If so then the app you're looking for should not appear in the running apps list. If it's not working right off the rip then the app you're looking for is likely there. Either way note the apps in the running apps list. If it isn't working, you have a list to start with. If it is working wait until it's not then cross the two lists to see what's new, for a list of apps to start with.
You can pretty much eliminate Google apps, Facebook, tweeter, Instagram and heavily branded apps to narrow things down for your self.
Take what's left and look at your power screen, consumption, and see what's running when the screen is on. This may or may not help you narrow the list more. Whatever you end up with go to the Play Store and search those apps. Note the review ratings. Start with anything that's lower than 3 - 3.5 stars. Read the 1 star reviews. Look for your problem to be mentioned. Hopefully someone had reported the issue. Obviously even if you like the app, it doesn't like you so remove it, restart the device and test if you have successfully found the issue.
A few don'ts that come in handy, don't install apps lower the 3.5 stars, don't install apps that you haven't read at least 5 one star reviews, and don't be early to an app, wait until it has at least 30 to 50 thousand downloads. I'd say closer to 50 but that's me. Report your findings it helps others.