The referendum was almost 4 years ago and only last year they were talking about expanding in the UK. Some people might have been in denial but considering the political force of a referendum result and the glaring absence of any political alternative for years now, any other Brexit outcome was a fantasy and remaining in the single market never realistic.
As you say the reality is that they are not doing very well in the UK and they are also investing in the US, and so made a commercial decision not to invest further in the UK.
Edit: As far as I know a full banking licence is not compulsory to offer purely electronic current accounts in the UK. Revolut only got a banking licence in 2018, and it is from Lithuania, so they are also at risk of losing it for their operation in the UK. Just saying...