I have duplicated the behaviour you describe - and of course, this does raise an interesting question as to how a source line should ultimately be related to an address. For this question, CDT, the Compiler/Linker/Dwarf debug tables and GDB are involved.
However, the behaviour is that breakpoints set by double clicking within the edit view will be set to an address corresponding to the closest match to actual code. You can see within the Debugger console which particular breakpoint has been hit - if required. There are alternative options such as setting breakpoints within the IDE on particular functions etc.
You can also drop to the Debugger Console to directly set breakpoints on an address or on a function e.g.
break *0x2000
Breakpoint 6 at 0x2000
break *used_function
Breakpoint 7 at 0x8ac: file ../source/hello_world.c, line 86.
break *unused_function
Breakpoint 8 at 0x0 <<-- since this function doesn't get linked into the image
While we accept that this may not always be ideal, there is likely nothing we can do to change this behaviour.
Yours,
MCUXpresso IDE Support