If you were building a deck, all beam-to-post connections MUST be either let-in (notch the top of the post so that the beam is resting ON the notch ledge) OR you can use a post-to-beam metal connector with the beam resting on top of the post and the metal connector connecting the beam to the post.
The beam MUST rest on top of the post somehow. Either on top of the post (using a beam-to-post metal connector) or resting on a notch (ledge) cut into the post. You can NOT rely on the fasteners to hold a beam to the post, you have to have the beam resting on the post.
If you are working or dealing with a pole barn or post-and-beam structure, you will have to follow both the 'engineered' plans for the structure (the ones submitted and approved for the building permit) and the applicable local building Codes (which should have been used to approved the submitted plans for the permit

).
The plans and the Code both will specify the (minimum) acceptable 'correct' attachment method(s) and the fastener method(s) or options.
Deck building Codes and requirements have changed over the last (20?) years because of multiple deck structural failures, with damage and injury and fatalities.
Remember that Code just specifies the MINIMUM requirements. For example, Code may say the minimum required size is a 2x6. That means you can't use a 2x4 there, but can use a 2x8. Code may say you have to use a minimum of 6 16D nails for a connection, that means you can't use 10D nails or only use 4 16D nails. Code may say you have to use minimum 1/2" (nominal) thick sheathing, that means you can't use 3/8" (nominal) but could use 5/8" (nominal) sheathing there. Etc.
Although I like GRK (or similar) structural screws, they may or may not be rated/allowed for the connection you are considering. Check the Code and permit and plans for what to use on the specific connection.
(based on what the Code requirements are for decks and a similar beam/ledger to post connection, I'd really lean towards doing your pole building or post-and-beam structure using similar construction guidelines. Notch the post and rest the ledger/beam on the notch or use rest the beam/ledger on top of the post connected with a beam-to-post metal connector. With the appropriate specified fasteners.)
example:
https://sutherlands.com/article/post-frame-building-basics/59