The lock-in applies per investment tranche, not to the entire accumulated corpus. If you invest through SIP, each monthly instalment carries its own three-year lock-in from its investment date.
This is the detail that catches most SIP investors off guard. Starting an ELSS SIP in April 2025 and expecting to redeem the full amount in April 2028 will not work. Only the April 2025 instalment will have completed its lock-in by then. The March 2028 instalment will unlock only in March 2031.

.