Sony can lock your PSN account according to their terms and conditions for using a script.
To be honest after seeing further reactions elsewhere I don't see how people aren't connecting the dots here. On one hand you have people complaining that GT7 has taken a new direction and is almost designed as a live service game. On the other hand, (and I have no idea what the venn diagram looks like but there has to be some crossover) you have people confident that there is no chance that they could be banned for this.
If you ran a bot script on any other live service game you would have your account locked out. There would be no PR disaster if Sony decided to lock out anyone who ran a bot, we all know what the internet is like, do people realise how little sympathy there is going to be for players who knowingly broke the terms of service?
I'm not saying it's likely to happen because it still relies on Sony being able to detect suspicious behaviour, which is unlikely but is ultimately unknown and certainly not impossible like some people believe. And regardless of what their current Anti-Cheat software looks like, it's certainly something they are going to be looking to make more robust off the back of this to protect their recent investments into live service games.
It would certainly be possible that bans could be issued, either PD blocking online aspects of GT7 (basically the entire game then) or Sony blocking the user's account entirely.
If I was to give my amateur psychologist opinion, I'd guess most players who are using the AFK scripts are not too bothered about a ban from GT7. At this point in time credits earned by playing the game as PD have decided it should be played (not grinding or using AFK methods) don't give the experience AFK-users want. Their choice is to either play something they're not particularly enjoying, or AFK away and run the slight risk of a ban. If they get banned they are not in a significantly worse position than if they had just played normally, they can set up a new account and restart on that. They will have lost some progress but the point is it's risk v reward. Rapid acquisition of cars versus slight risk of a ban from a game they weren't really enjoying anyway.
Given that these methods have no impact on other users because they only give credits to purchase cars that could be earned or bought by every user, there's little benefit to Sony issuing account bans because it will only serve to dissuade people from buying Sony products in future. Breaches of the Ts and Cs like this that don't cause problems for other players are useful to developers because they help to iron out these issues to prevent them from occurring in the future.
There are three ways to stop AFK scripts:
1. Make them impossible
2. Make them impractical
3. Make them unnecessary
Sony's aim would probably be to prevent AFK scripts even being usable in the first place. If they make the remote play app only work with an official controller and not allow AutoHotkey to simulate control buttons being pressed, the AFK problem goes away. I don't know how possible this is but I guess if it were easy, they'd be doing it already.
The second and third options are in PD's hands. They've tried making them impractical by reducing the payouts but that has been unpopular because it makes the experience worse for all players. There are probably ways to address this, such as not allowing users to repeat races over and over for hours on end, although this would be unpopular with the grinders.
The best way to prevent AFK being used without alienating general users is to make AFK unnecessary, probably by raising the payouts. Nobody has bought GT7 because they
wanted to spend all day streaming it to their PC running an AFK script. Make the economy more generous and make the "micro" transactions less obviously offensive then people wouldn't feel the need to do anything other than play the game normally.
Hopefully yesterday's announcement suggests that PD are recognising that making the economy less harsh would make GT7 more enjoyable for a lot of players.