Most likely an overheating battery. The tool has thermal protection.
Stop operating immediately. Let the tool and battery cartridge cool down in a shaded area below 40°C (104°F). Do not charge a hot battery. Check the battery contacts on the tool and cartridge for debris. Ensure the battery is fully inserted until the red indicator on the button is not visible. Use only approved battery cartridges: BL1815N, BL1820B, BL1830, BL1830B, BL1840B, BL1850B, or BL1860B.
If that didn't work, the battery may be damaged. Do not use a damaged battery. Try a different, known-good Makita 18V LXT battery.
Heads up: Never store the tool and battery where temperatures exceed 50°C (122°F). Excessive heat degrades battery life and triggers safety shutdowns.