So, this is an extremely late answer, but your problem (as far as I can tell from your pictures) is that you wired both of the black wires from the switch into the same wire nut, apparently to the supply hot line (assuming that red on your tester means that it detects a live line.)
In the switch box, you should have (at least) the following lines:
From the supply:
- supply hot (usually black)
- supply neutral (usually white)
- supply ground (green)
From the light fixture:
- switched hot (usually black)
- fixture's neutral (usually white)
The green (or bare) wires are just for grounding safety. They aren't part of the circuit that operates the light.
The two black wires that went into your original switch are the supply hot and the switched hot. The complete circuit that powers the light should allow current to flow from supply hot through the switch to switched hot, then through the light fixture, to the fixture's neutral, then to supply neutral. Presumably, the fixture's neutral is combined with the supply neutral in your bundle of white wires that are nutted together. The circuit is then controlled switching whether the supply hot and switched hot are connected at the switch.
Your new circuit through the smart switch should be nearly identical to the original configuration, except with an extra neutral (white) wire running from the switch to your bundle of neutral wires. In particular, one of the black lines from the switch should be attached via wire nut to the one of the black lines that went into your old switch and the other should be attached to the other black line that went into your old switch. But these should not be attached to each other!
This will form a circuit to power the light in the exact same way as your previous regular switch, with current flowing from supply hot to switched hot through the two black wires going into the switch.
The neutral (white) wire coming out of the switch is used only to power the electronics in the switch itself and is irrelevant to powering the light. The white wire from the switch exists only so that the switch has a complete circuit to power it even when the light is switched off.
Given your picture showing how the Kasa switched was wired in, your explanation of the behavior makes perfect sense: the switch was receiving power because its black wires were attached to the supply hot and its white wire to the supply neutral. However, the switch wasn't attached to the light fixture at all, so that's why it powered up and connected to the Wi-Fi, but didn't actually affect whether or not the light was lit.