I literally just tried this, and it works for me, in the latest release...
Ok, so I'm still going to send the pack. However, I think I know what's wrong. So when making a custom block, it didn't count as me being underground. However, adding the component "minecraft:light_dampening": 15, then counted me as being underground. So I think that's also why stairs also don't count you as being underground, because they don't change your light level in any way whatsoever.
So if this is the case, it would explain why stairs don't give me the tag 'NP' when being under them. While using the 'is_underground' filter.
I just want to note, that this bug has been happening to me since 1.19. However, it might have been happening before this as well.
I managed to fix the issue with my mob not spawning correctly. It's because I was trying to use Minecraft:delay_filter, which I was using wrong apparently. However, all mobs shouldn't stop generating, all because one mob that you add into the game doesn't spawn correctly. Sorry if the title was a bit misleading, I just updated it, to describe it a whole lot better.
What they could do to fix this, is to make a new component for blocks, which could be called minecraft:on_player_destroying which could be similar to minecraft:on_player_placing.
Because, if you were to make an event, then do a sequence and then do a condition like query.get_equipped_item_name == 'diamond_pickaxe'. You could make it to where once it's being destroyed you could change the property of the block from true to false or so. Then you could just use permutations in order to detect if the property of the block is true or false. Then, you could change the block's mining speed using the component minecraft:destructible_by_mining. Now I feel like this could work as a temporary solution, for Mojang to add. While they actually fix the main issue.
Here's an example of what this could look like if it were ever added:
[media]
I also have this issue, I ended up posting about it, on Twitter, and others seem to be having this problem. Two of my other friends are also experiencing this as well...