I did a very exciting battle with a Kraken in D&D 4e. Like you, I realised that the players would try to attack the tentacles. But I also realised the Kraken entry in the Monster Manual is kinda bad.
So instead I designed a custom monster. In addition to leeching some powers off the original Kraken, I gave it a "raise tentacles" power that would summon a number of Tentacle minion creatures. Hitting one would "kill" it, causing the Kraken to pull it back and dealing it 5 damage. The Tentacle minions would take up 2 spaces and have no Reach, but they would move around a bit.
This helped me get around the limitation you mentioned and made the battle much more exciting and lively, as the Kraken would slowly withdraw arms and then occasionally spend an action to bring most of them back into the fray. Felt much more like a giant squid trying to crush a ship.
(I also made the beast rise up at the end of the ship and bite at things, so the players could also attack its head if they felt like it, with the risk of being shoved into the thing's mouth)
If you don't want to go the long way or need a quick option for other situations where a large beast with Reach swings out with a large appendage; I allow players to ready an attack on the creature when it swings out, and a player who is grabbed is allowed to make attacks against the creature as long as the grab rules allow it. But I don't trigger "enters the square" effects for them, as it's only a small part of them moving. It doesn't seem to cause any major balance issues. Most people don't really want to be grabbed or mauled by things so big they have that kind of Reach, so they make other plans to deal with them.
The invisible condition states:
An invisible creature is impossible to see without the aid of magic or a special sense. [...] The creature’s location can be detected by any noise it makes or any tracks it leaves.
Invisible is not the same as hidden as pointed out in the answer to this question.
Unless a creature is hidden, other creatures know the location of an invisible opponent without needing to make an ability check because "the creature’s location can be detected by any noise it makes or any tracks it leaves".
Best Answer
Krakens have powers that relate to lightning and storms
The Kraken as described in the 5e Monster Manual has a Lightning Storm ability that can shoot lightning bolts around it. A monster being resistant to the kind of energy it throws around all the time is pretty standard. In addition to that, one of the Kraken's lair abilities charges the water with electricity, and one of its regional effects allows it to control weather -- and I'm assuming it isn't going to aim for balmy sunshine!
Basically, krakens are a giant legendary monster that represents the power of a storm at sea in addition to the terrors of the deep. Resistance to lightning follows from that.