Arduino IDE confuses *.h files with *.ino sketches

I’m using arduino IDE version 1.8.10 it was working fine but suddenly with I open the project my headers files show up in the first tap of my project (See attached Image). this makes arduino IDE unable to compile the sketch correctly.

I’m using vsCode as external editor with arduino plug. external editor is checked in the arduino IDE preferences. the project is also a git repository. the compile verbose shows the following:

avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10810 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "C:\\Users\\******\\AppData\\Local\\Temp\\arduino_build_869209\\sketch\\HW_config.h.cpp" -o nul
Alternatives for HW_config.h: []HotboxArduino:3:10: error: HW_config.h: No such file or directory

in my preferences file is says that my last sketch opened if ***.h file instead of header file.

so far I tried the following:

1- creating new project whit *.ino file and *.h file ( worked) this mean the IDE does not get confused all the time.
2- creating new folder with sketch name (in the Desktop) and copy the projects file to is (Same issue)
3- removing the .git file (Same issue)
4- uninstalling and installing Arduino IDE (Same issue)
5- Manually editing preferences.txt (Same issue)
6- compiling with VSCode (Same issue)

could you please verify if this is a bug in the IDE ?? or if any one has similar issue

@aphcarios's bug report:

@aphcarios's Arduino IDE Taps.png:

@aphcarios's Preferances.txt.png:

I see you have censored the .ino file name, one of the .h file names, and the sketch folder name. Is that really such top secret information? It might be very helpful to know this information. If it really is top secret, please see if you can reproduce the problem with non-top secret filenames and then put the entire folder in a .zip file and post it here so I can look at it and see whether the same problem occurs on my machine. If you click the "Reply" button here, you will see a "Attachments and other settings" link that will allow you to make the attachment.