I5-8400 boost speed are:
For 1 core 4.0 GHz (in practice it is never achieved, only in unreal laboratory situations, it is pure intel marketing)
For 2,3,4 cores 3.9 GHz
For 5,6 cores 3.8 GHz.
The speed is BCLK x multiplier. For 6 cores the maximum multiplier is 38.
The value of BCLK is 100, but in load situations it can drop a bit so that 3.8 GHz is not reached. It is not a CPU problem but rather a limitation of the motherboard. Some people slightly raise the BLCK to 101 or 102 but I think it's not worth it. Under no concept must 103 be exceeded.
In any case the Intel boost is conditioned to adequate temperatures and Intel does not guarantee any value. The values listed are those that have been found by many people.
You can download "Intel Processor diagnostic tool" to make sure that your CPU is fine, but I do not think it is necessary.