If I had to guess, I'd guess it is part of the latch http://www.realoem.com/bmw/enUS/part?id=1Z63-USA-01-2017-I01-BMW_i-i3_94Ah&mg=41&sg=60&diagId=41_2323&q=51247248075
A check with the dealership's service department might clear that up. It could be that all it needs is a little adjustment of the stop so that it goes a little further in. It could also be that it goes in too far. I think there are some rubber stops that can be moved in/out by turning them a little. If you press on the hatch after it's closed, does it move? If so, it might need to go in a bit further. It may not take much, a millimeter might be enough.
My rear door is really sensitive about being fully closed. I don't have to slam them, but maybe a bit harder than I'd like. ON those, though, I think that it's because there's a latch on the top and bottom edge of those doors...not the case with the rear hatch. I think they use hall effect switches, which have a very narrow band of on/off rather than a mechanical switch. They're quite reliable, but there is some electronics required for them to work.