In situations like that I don't even allow rolls without proficiency because it prevents situations where the expert fails, but someone with absolutely no experience is able to succeed. It creates stupid gonzo situations where the DM has to create some ridiculous excuse why the highly-experienced character failed while the complete novice didn't. It just feels bad for everyone.
The only situations where I allow non-proficient rolls are checks that basically any average person could have a reasonable chance of knowing/being able to perform.
Perception/Investigation are difficult skills to adjudicate in skilled vs. unskilled situations and really depends on the details.
i know a lot of DM's do the same, but i don't really agree. though i do understand that it forces the DM to adlib on the spot and come up with a reason for how that scenario happened, and i understand that that skill isn't in everyone's wheelhouse. that being said, there are plenty of times when a person who is skilled in something can fail while a person who isn't skilled can succeed.
i've mentioned this scenario previously, but in one of my home games, we were all playing a guild of dwarven crafters who ended up becoming adventurers. the very first roll of our campaign, the dm said we arrived at a town and we spent the day setting up our tents and wares for the next day's fair. he asked us to roll just to see how long it took us to do that and i rolled a nat 1. i was one of the older dwarves (we were a clan and basically all cousins) and had the most experience but the newbie in the group, the youngest, least experienced dwarf rolled a nat 20. the DM explained it that him being the newbie, had convinced me to help him. guide him and watch him throughout the day to make sure he knew all the tricks of setting up a stall. how best to place things to get people's attention, stuff like that. but because i got roped into helping him, i had to stay late and finish my tent while the rest of them went out drinking and celebrating.
it was a simple thing, and he completely came up with it on the fly, but it was a defining moment of development for a character i didn't quite understand yet. he'd absolutely suffer for any one of his clansmen to succeed. he was the older brother of the group that bent over backwards to make sure his family won the day. i rolled a 1, in an area that i was skilled at, but it didn't feel like a failure. it felt like the obvious choice my character would make. the other guy rolled a nat 20 in an area that he was not skilled in, but it wasn't something that he just auto-completed by some miracle. he did what his character would have done and asked for help from the character that was the most experienced.
i suppose you could argue that that's not what happened "mechanically" in that i didn't perform the "help" action and allow him to roll at advantage, he wasn't skilled in that area so he wouldn't have been able to "accept" the help anyway. but in a real world scenario, the new guy on the job asked the veteran for help and he got it.
the same KIND of thing could be used to explain most times a skilled person fails while an unskilled person succeeds. i know a lot of people don't allow nat 20's to auto succeed for the very same reason, but i don't really like that either. you have to respect the nat 20. but again i understand why people don't. it puts the DM on the spot. but if a skilled person and an unskilled person both got a nat 20, i'd give them different answers. people stumble onto the right answer ALL the time. i don't remember which comedian it was... maybe jim gaffigan? whoever it was had a joke about who wants to be a millionaire and how people monologue their thought processes. his joke was monologuing completely wrong information but ending up at the right answer in almost complete defiance of reason.
i know it's not for everyone, but it feels awful rolling a nat 20 and the DM saying, oh, unfortunately with your bonus of a +1, you miss the dc of 22. sorry, you get nothing.