GFCI protection still works through an extension cord.
Yes, plugging an extension cord into a GFCI outlet doesn’t affect the protection. The GFCI monitors the difference between hot and neutral current right there at the outlet – the extension cord is just a pair of wires. As long as the cord itself doesn’t have a fault, the GFCI will trip if a device plugged into the far end leaks current.
That said, don’t push it. A long, skinny extension cord can drop voltage enough to make some tools run sluggish or hot, but that’s a performance issue, not a safety one. Keep the cord in good shape, don’t bury it under rugs, and make sure it’s rated for whatever you’re powering.
The GFCI is doing its job regardless of cord length. Just don’t daisy-chain a bunch of cords – that’s where you invite trouble.