When particles are created, their lighting is determined based on the surrounding light. However, if the light changes, the lighting of the particles does not.
For instance, breaking a block in a dark area, then revealing a light will keep the breaking particles dark. Similarly, breaking a block in a bright area then removing light keeps the particles fully lit. Attached is a comparison (of the latter scenario) between the incorrect behavior, and the correct behavior as shown in Java edition.