I accidently pressed the power button on the Switch causing it to go to sleep as it was about to load a Turf War online game. Naturally when I turned it back on it said that the connection was lost due to the console going to sleep mode. I stopped playing just to be safe.
I really hope I don't get penalties for that.
Not sure how it works for ranked, but at least in the case of turf war I don't think you have anything to worry about penalty-wise unless you have several disconnects like that in a short span of time. You'll get a warning about it if it's happened enough to be considered a problem.
Interestingly, SplatNet 2 has a section in your personal stats that tracks the number of network disconnects you've had. It's interesting to me that they both track that and allow you to view it.